'kill 0' from cron script kills crond

Denys Vlasenko vda.linux at googlemail.com
Tue Dec 2 21:49:34 UTC 2008


On Tuesday 02 December 2008 17:40, Jeroen van der Vegt wrote:
> Hello, 
> 
> 
> We're using Busybox on an embedded ARM platform. We'd like to have a script
> running from cron every minute. To terminate any remaining child processes,
> we'd like to perform the 'kill 0' command at the end of the script. This '0'
> is a special argument. From e.g.
> http://linux.about.com/od/commands/l/blcmdl1_kill.htm :
> 
> ..... 
> 0
>     All processes in the current process group are signalled. 
> .... 
> 
> It seems that this command works in Busybox as well. However, if we use this
> in a script that is run from 'crond', crond itself is killed as well. That
> is obviously not as expected, and indeed different from the behaviour of a
> system without Busybox.

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?
--
vda

-------------- next part --------------
A non-text attachment was scrubbed...
Name: z.diff
Type: text/x-diff
Size: 765 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20081202/2e93d538/attachment.bin 


More information about the busybox mailing list