[PATCH] rsync kills all user processes on fork failure
Martin Pool
mbp at samba.org
Sun May 12 03:44:02 EST 2002
On 9 May 2002, Bob Byrnes <byrnes at curl.com> wrote:
> On May 9, 4:51pm, dwd at bell-labs.com (Dave Dykstra) wrote:
> -- Subject: Re: [PATCH] rsync kills all user processes on fork failure
> >
> > What's the best fix against the current CVS? Should we back out the
> > previous fix because that one only solved half the problem? Somebody
> > please provide an updated patch.
> >
> -- End of excerpt from Dave Dykstra
>
> I've appended an updated patch that can be applied to the current CVS.
>
> Description:
>
> -- Be extra careful: reject any negative pid in do_fork(),
> not just -1 (since other negative values would also be
> harmful if they were ever passed to kill, even though
> such values should never occur).
OK
> -- Expand all_pids[] dynamically as needed in do_fork(), to
> avoid any possibility of overflow.
I can't see any situation in which that would happen. I can understand
being defensive, but this seems like overkill.
> -- Prevent kill(-1, SIGUSR2) in main.c; this is independent of
> the interaction between do_fork() and kill_all(), which
> involves SIGUSR1.
Good.
--
Martin
More information about the rsync
mailing list