upstart socket activation
Steffen Barszus
steffenbpunkt at googlemail.com
Mon Apr 4 17:43:37 UTC 2011
On Wed, 16 Mar 2011 07:22:36 -0700
Clint Byrum <clint at ubuntu.com> wrote:
> On Wed, 2011-03-16 at 15:15 +0100, Steffen Barszus wrote:
> > 2011/3/16 Clint Byrum <clint at ubuntu.com>:
> > >> i would like sto start the client as soon as the server is
> > >> providing the socket for it (network or file)
> > >>
> > >
> > > This is handled without socket activation:
> > >
> > > start on started server
> >
> > Well this not true. Maybe in an ideal world. In my specific case, i
> > have a server (namely vdr), which starts up in 3s or more, the
> > socket will be created somewhere in that time, if i start the
> > client at "started" event of the server, its more than likely, the
> > socket have not been created yet. Its having different sockets for
> > frontend and status display. Until now i've put in while ... do
> > sleep x ; done loops to cover this cases.
> >
> > The only chance i see to use the suggested approach is to do a
> > post-start script putting the while loop in.
> >
> > Is this a really special requirement, wrong understanding/approach
> > from my side ?
Sorry, lost the list in between.
> Right, we do this in mysql too where we loop and ping in the
> post-start until mysql is ready to serve requests.
>
> We could of course do:
>
> expect listen
>
> But then, the socket activation just does the same thing.. so why not
> just use the socket activation?
I would like to. How ? To take more generic example: I would like start
a job, once a webserver is providing port 80. Is this possible or not ?
If not - how should i interpret that last sentence of you ?
Sorry i have the feeling we don't quite understand each other ^^ lets
try again ;)
The man page is a bit sparse for me to get a grip on this.
Ultimate goal for me would be to get rid of the sleep loops, which i
would consider ugly.
Thanks!
Steffen
More information about the upstart-devel
mailing list