lost status code

Dave Dykstra dwd at bell-labs.com
Fri Mar 22 04:42:42 EST 2002


I don't recommend it for 2.5.5 because we desperately need a stable release
and this is a risky change.  Tridge, do you have any recollection about
what problem you were trying to solve?

I expect the real fix will be significantly more complicated.

- Dave

On Wed, Mar 20, 2002 at 01:19:38PM -0500, Todd Vander Does wrote:
> The modification Dave suggested continues to work.  Can it be
> added to the release code?  (Dave cautioned that he didn't know
> why the code had been made active.)
> 
> Todd
> 
> 
> static RETSIGTYPE sigchld_handler(int val) {
> //#ifdef WNOHANG
>         //while (waitpid(-1, NULL, WNOHANG) > 0) ;
> //#endif
> }
> 
> 
> On Thu, 28 Feb 2002, Dave Dykstra wrote:
> 
> > I investigated this and found it came down to the revision 1.129 in the
> > rsync CVS at
> >     http://cvs.samba.org/cgi-bin/cvsweb/rsync/main.c
> >
> > Here's a patch to undo it:
> >
> > --- main.c.O    Fri Feb 22 18:24:38 2002
> > +++ main.c      Thu Feb 28 13:03:29 2002
> > @@ -797,7 +797,7 @@
> >  }
> >
> >  static RETSIGTYPE sigchld_handler(int UNUSED(val)) {
> > -#ifdef WNOHANG
> > +#ifdef 0 /* was WNOHANG */
> >         while (waitpid(-1, NULL, WNOHANG) > 0) ;
> >  #endif
> >  }
> >
> >
> > The trouble is, that change was put in 7 months ago by rsync's author
> > Andrew Tridgell and I don't know why he did it or what else will break
> > by taking it back out.
> >
> > - Dave Dykstra
> >
> >
> > On Wed, Feb 27, 2002 at 05:53:22PM -0500, Todd Vander Does wrote:
> > >
> > > Rsync reports the status code of the remote command.  So in some
> > > situations the status code is successful when the command fails.
> > > Rsync of a remote file to a local read-only directory fails, but
> > > exits with $status = 0.  I'd like to get $status = 23.  Is it
> > > possible?
> > >
> > > Local copy fails with status = 23
> > > > mkdir /tmp/nowrite
> > > > chmod -w /tmp/nowrite
> > > > rsync /etc/group /tmp/nowrite || echo $status
> > > mkstemp .group.cUaaeY failed
> > > rsync error: partial transfer (code 23) at main.c(518)
> > > 23
> > >
> > > Remote to local copy fails with status=0
> > > > rsync -e ssh loki:/etc/group /tmp/nowrite || echo $status
> > > mkstemp .group.1rayeY failed
> > > > rsync -e ssh loki:/etc/group /tmp/nowrite && echo $status
> > > mkstemp .group.fbaGiY failed
> > > 0
> > >
> > > Local to remote copy fails with status = 23
> > > > ssh loki mkdir /tmp/nowrite
> > > > ssh loki chmod -w !$
> > > ssh loki chmod -w /tmp/nowrite
> > > > rsync -e ssh /etc/group loki:/tmp/nowrite || echo $status
> > > mkstemp .group.EGai3c failed
> > > rsync error: partial transfer (code 23) at main.c(518)
> > > 23




More information about the rsync mailing list