'kill 0' from cron script kills crond

Jeroen van der Vegt jeroen.van.der.vegt at technolution.nl
Thu Dec 4 13:00:31 UTC 2008


Hi all,


Thanks for the amazingly fast response and fix: inserting 'bb_setpgrp;' at
the positions the initial patch indicated works perfectly (tested by
backporting the patch to busybox 1.4.1).

The 'standard' cron I mentioned was the one supplied with Ubuntu 7.10:
version 3.0pl1-100.


Regards,

Jeroen van der Vegt.


> -----Original Message-----
> From: busybox-bounces at busybox.net [mailto:busybox-bounces at busybox.net] On
> Behalf Of Bernhard Reutner-Fischer
> Sent: woensdag 3 december 2008 14:19
> To: Denys Vlasenko
> Cc: busybox at busybox.net
> Subject: Re: 'kill 0' from cron script kills crond
> 
> On Wed, Dec 03, 2008 at 11:47:37AM +0100, Denys Vlasenko wrote:
> >On Wednesday 03 December 2008 09:24, Bernhard Reutner-Fischer wrote:
> >> >This means that "standard" cron puts each child into new process
> group.
> >> >(BTW, this "standard" crond - what --version and/or --help says?)
> >> >
> >> >Please try this patch, does it fix the problem?
> >>
> >> please use bb_setpgrp (see platform.h).
> >
> >Done.
> >
> >
> >/* use legacy setpgrp(pid_t,pid_t) for now.  move to platform.c */
> >#define bb_setpgrp() do { pid_t __me = getpid(); setpgrp(__me,__me); }
> while (0)
> >
> >Does __digital__ *really* have setpgrp(x,y) with two params?!
> 
> yes, it really has (if _XOPEN_SOURCE_EXTENDED is not defined).
> We could probably also fallback to setpgid(), but setpgid(x,x) worked ok.
> 
> I do not know if that was changed in OSF/1 > 5.1 though. These later
> versions
> don't support the HW i have so i can't check.
> 
> >Maybe it's a typo, should be setpgid(x,y)?
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox




More information about the busybox mailing list