On Thu, Jan 03, 2008 at 10:48:01PM +0100, Gabor Gombas wrote: > On Thu, Jan 03, 2008 at 10:40:32AM -0800, Steve Langasek wrote:
> > It's also, as commented already in the init script, recognized as a bug in > > the associated daemon. Fixing that bug would drop the need for the sleep, > > though if there's a possibility of SIGKILL coming before the daemon is done > > shutting down then you still don't have a guaranteed cleanup, and there's no > > good "wait for process termination" facility that we can use from init > > scripts. > Yep, "waiting for an unrelated process to exit" is surprisingly hard to > do correctly. I wonder if the processor connector support in recent > kernels could be used to create a "kill_and_wait" utility: > - start listening on netlink for process-related events > - send the signal to the process > - wait until we receive a notification that the process has died (or a > timeout has occured). > - from time to time do a kill(pid, 0) just to be sure we did not loose > netlink messages In that case, why would we not just migrate toward upstart as an init with service supervisor capabilities? :) -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ [EMAIL PROTECTED] [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]