* Explanation of how Unicorn returns error code when daemonized and cannot bind the address
@ 2010-04-15 17:17 Iñaki Baz Castillo
2010-04-15 17:46 ` Iñaki Baz Castillo
0 siblings, 1 reply; 2+ messages in thread
From: Iñaki Baz Castillo @ 2010-04-15 17:17 UTC (permalink / raw)
To: unicorn list
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.
Really thanks a lot.
--
Iñaki Baz Castillo
<ibc@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Explanation of how Unicorn returns error code when daemonized and cannot bind the address
2010-04-15 17:17 Explanation of how Unicorn returns error code when daemonized and cannot bind the address Iñaki Baz Castillo
@ 2010-04-15 17:46 ` Iñaki Baz Castillo
0 siblings, 0 replies; 2+ messages in thread
From: Iñaki Baz Castillo @ 2010-04-15 17:46 UTC (permalink / raw)
To: unicorn list
2010/4/15 Iñaki Baz Castillo <ibc@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
<ibc@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-15 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-15 17:17 Explanation of how Unicorn returns error code when daemonized and cannot bind the address Iñaki Baz Castillo
2010-04-15 17:46 ` Iñaki Baz Castillo
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).