Upstart 0.5 Are We There Yet?
Scott James Remnant
scott at netsplit.com
Wed Jan 16 14:13:08 GMT 2008
On Wed, 2008-01-16 at 12:45 +0100, Michael Biebl wrote:
> 2008/1/16, Scott James Remnant <scott at netsplit.com>:
> >
> > [NEW] Service readiness announcement through SIGSTOP.
> >
> > When services remain in the foreground, there's no usual
> > way for them to signal that they have completed their
> > initialisation and are ready to receive client connections.
> >
> > The usual method when they go into the background is to use the
> > fork() for this, but obviously this isn't available.
> >
> > Upstart supports a different method for foreground services,
> > they may raise the SIGSTOP signal. This signals that they are
> > ready, Upstart will sent them SIGCONT and adjust its own job
> > state to take the job out of SPAWNED and towards RUNNING.
>
> Do you use a new flag in the job description file to signal if you
> have to wait for SIGSTOP? If not, how do you differentiate non-forking
> jobs that use SIGSTOP from the ones which don't?
>
Yes.
Ordinary foreground jobs with no notification have no flag (or "wait for
none").
Jobs that raise(SIGSTOP) will have "wait for stop".
Jobs that fork twice will have "wait for daemon", jobs that only fork
once will have "wait for fork".
> > Disable a job from its definition, instead of just deleting it.
> >
> > I have again become unconvinced of the usefulness of this,
> > instead favouring something more like "profiles" or "flags"
> > where jobs can be disabled and enabled en-masse.
> >
> > Unless somebody can provide a use-case for having a defined job
> > that cannot be started?
>
>
> I can only speak from my own experience. E.g. I have apache2 installed
> on it, but disabled it from starting at boot (I only need it on
> special occasions and then I start it manually).
> It's definitely possible to achieve that with profiles or flags, I
> only think it would be more effort and less convenient.
>
But this is different again, this isn't disabling the job since you want
to be able to start it manually -- this is causing the job to ignore
events; arguably you can do that already by commenting out the
appropriate lines in the definition.
Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/upstart-devel/attachments/20080116/02e33a92/attachment.pgp
More information about the upstart-devel
mailing list