:: Re: [Dng] Readiness notification
Etusivu
Poista viesti
Vastaa
Lähettäjä: Laurent Bercot
Päiväys:  
Vastaanottaja: Isaac Dunham
Kopio: dng
Aihe: Re: [Dng] Readiness notification
On 15/06/2015 05:57, Isaac Dunham wrote:
> (3) Server uses "not-a-supervisor":
> # write a small C wrapper that forks, execs server in child,
> # accepts s6-style notification and exits in parent
> fake-sv -d 1 server
> client


The main reason why I advocate such a simple notification style is
that this kind of thing is trivial to script, without a C wrapper:

  if {server &;} | read y ; then
    client
  else
    echo "Server did not notify readiness" 1>&2
    exit 1
  fi



> (4) Server with s6, as far as I can tell from the skarnet docs:


Using a supervision framework is the best solution if there is a
case for running the server independently from the client. If there
isn't, the above script works.

--
Laurent