"Unexplained error code xxx" in rsync-2.5.5

Dave Dykstra dwd at bell-labs.com
Mon May 13 10:39:21 EST 2002

On Sun, May 12, 2002 at 04:13:51PM +0200, Matthias Kurz wrote:
> Hi.
> We sometimes/often get such errors. It occures in main.c/client_run().
> I investigated further and found, that the waitpid() in
> main.c/wait_process() exits with -1, errno = ECHILD, which means
> "No children". *status can contain garbage in such cases - but not
> always. It happens under Solaris-2.5.1/SPARC.
> It (ECHILD) also happens on other Solaris versions - but there *status
> seems to be always set to/left at 0, so the error slips through.

The fix at
might work for you.

Martin, can you please followup with Tridge to ask him what problem he
was trying to solve with the waitpid() call in the sigchld_handler()?
It's a serious bug.

> I cannot investigate further, because i'm under pressure. So i ask
> you. This is a local copy operation:
>    rsync -aC --exclude=README --exclude=Makefile . /u/tmp/bla
> Is there a child process forked for a local copy at all ?

Yes a child process is forked for a local copy too.

> Another problem in main.c/wait_process(). A call to WEXITSTATUS(*status)
> must only happen, when WIFEXITED(*status) returns true.
> Else, WIFSIGNALED(*status) could be true, in which case the process was
> terminated by a signal. One has to extract the signal number using
> WTERMSIG(*stat)... and so on. There is also WIFSTOPPED() and

I think you're right.  This code was also put in by Tridge, in version
2.4.5, cvs revision 1.114 of main.c.

Does anybody know of some code from a highly ported open source project
that does this right which we can borrow?

- Dave Dykstra

More information about the rsync mailing list