On Mon, Mar 18, 2002 at 10:48:06AM -0500, Caleb Epstein wrote:
> Being the paranoid and technically minded sort, I've recently
> begun using fish:// instead of ftp:// when talking to servers
> on whic I have an account. I noticed today after queuenig a
> bunch of mirror commands and then exiting lftp I get this
> error in my lftp log file over and over and over again:
>
> waitpid: No child processes
>
> The downloads are proceeding normally, but this error is
> filling up my disk.
It looks like the error message is not needed. When lftp forks into background,
its child processes become parentless, that is why waitpid fails. Fortunately,
lftp checks for process existence by kill(pid,0), and still can determine
if the process terminate. There is remote opportunity for some other process
to occupy the pid, does anybody has an idea how to cope with that?
Anyway, this patch should fix the reported problem.
--
Alexander.
Index: ProcWait.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/ProcWait.cc,v
retrieving revision 1.13
diff -u -p -u -r1.13 ProcWait.cc
--- ProcWait.cc 2002/01/21 16:25:15 1.13
+++ ProcWait.cc 2002/03/18 16:20:16
@@ -56,11 +56,10 @@ int ProcWait::Do()
{
status=TERMINATED;
term_info=255;
- return MOVED;
+ m=MOVED;
+ goto final;
}
- perror("waitpid");
- TimeoutS(30);
- return STALL;
+ goto leave;
}
if(res==pid)
{