Hi,

The following check was introduced in version 1.4.13-4 of the force-reload | restart section in /etc/init.d/lighttpd:

  [ -r  $PIDFILE ] && while pidof lighttpd |\
     grep -q `cat $PIDFILE 2>/dev/null` 2>/dev/null ; do sleep 1; done

With this check the logrotate hangs as follows:

21891 ?        S      0:00 /USR/SBIN/CRON
21892 ? Ss 0:00 /bin/sh -c test -x /usr/sbin/anacron || run-parts --r
21893 ?        S      0:00 run-parts --report /etc/cron.daily
21912 ?        Zs     0:00 [logrotate] <defunct>


I don't exactly understand this new check. I think that the number in PIDFILE after restart is again the same as pidof? In the past the sleep 1 was enough on my machines to restart, so probably the new check is always true, even as the PID has changed...

I think a better check is first get the old PID and then check this one with pidoff until both are different.

Henk van de Kamer


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to