2010/4/15 Iñaki Baz Castillo <i...@aliax.net>:
> Hi Eric, as you remember you did an improvement in Unicorn in order it
> to return an error code (maybe 1) when running daemonized and trying
> to bind in a wrong address (i.e. a non local address).
>
> As far as I remember you implemented a pipe between daemon and master
> process, so if the master returns error it sends such result to the
> daemon process and it also ends with error. This is more than useful
> and required when handling init script with HeartBeat and similar
> software in which the return code of the init script must be correct
> (it just can return 0 if it has started correctly).
>
> If I'm wrong, could you detail it a bit please? I want to propose the
> same improvement in other project in which I participate.

Well, I've rechecked the code and it seems simple: the grandparent
process wait listening into the pipe. The master process would write
in the pipe if all goes ok, then grandparent would exit with 0. If the
master process fails it closes the pipe, the grandparent detects it
and exits with 1 (error)  :)


-- 
Iñaki Baz Castillo
<i...@aliax.net>
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to