innwatch forks without reason
Julien ÉLIE
julien at trigofacile.com
Mon Sep 15 12:09:14 UTC 2014
Hi Lauri,
> Applying this patch on top of a 2.5.4 installation causes innwatch to
> continually fork children; I am seeing 437 processes called 'innwatch'
> in just over 5 minutes of running inn
So it seems that innwatch does not wait for the forked-off shell to
terminate.
while { sleep ${NEXTSLEEP} & CHILDPID=$! ; }
do
wait
CHILDPID=
NEXTSLEEP=${INNWATCHSLEEPTIME}
[...]
does not do the right thing for you (maybe it should be "wait
${CHILDPID}"?).
We had before "sleep ${NEXTSLEEP} & wait" that did the trick except when
INN
is stopped. That's why I added CHILDPID to kill the child process when
innwatch
is killed (see the trap condition for SIGTERM=15). This trick does not
seem
to work on illumos.
> These seem to be the forked-off sleeps (remembering that sleep is a
> shell
> builtin on illumos /bin/sh; these are shells)
I would have liked to have code that conciliates the two behaviours
(sleep being a builtin or not)...
--
Julien ÉLIE
More information about the inn-workers
mailing list