[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC: terminate init script when service is ready

On Mon, Aug 06, 2012 at 12:35:09AM +0200, Salvo Tomaselli wrote:

> since services might depend on other services at boot, they must be sorted.

> But after doing a "service foo start", and waiting for its termination, we 
> don't know if the service has started or not, maybe the process was just 
> created and is kept waiting by the sheduler, so when the next service is 
> started the service might not really be there.

> Would it help to have the knowledge that, when the init script terminates, the 
> service is running and ready instead of just running?

This is already what's expected from init scripts.  Any that don't already
fulfill this requirement - by exiting before the service is ready - are

> It would be fairly simple to implement, start-stop-daemon could set an env
> var with it's own pid and the service could send a signal after listening
> to the socket and before the accept(),

Or the service could be written as a proper Unix service, and not detach
from the foreground until it's listening on the socket.

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/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature

Reply to: