* Re: [RFC/PATCH] http_server: handle premature grandparent death
2014-05-02 23:15 6% [RFC/PATCH] http_server: handle premature grandparent death Eric Wong
@ 2014-05-04 2:33 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2014-05-04 2:33 UTC (permalink / raw)
To: mongrel-unicorn, unicorn-public
Eric Wong <e@80x24.org> wrote:
> This may fix the following issue:
>
> https://github.com/kostya/eye/issues/49
>
> (which I was notified of privately via email)
Confirmed to be the case privately. Pushed.
> Will push and tag 4.8.3 this weekend (along with mailing list change).
^ permalink raw reply [relevance 7%]
* [RFC/PATCH] http_server: handle premature grandparent death
@ 2014-05-02 23:15 6% Eric Wong
2014-05-04 2:33 7% ` Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2014-05-02 23:15 UTC (permalink / raw)
To: mongrel-unicorn, unicorn-public
When daemonizing, it is possible for the grandparent to be
terminated by another process before the master can notify
it. Do not abort the master in this case.
This may fix the following issue:
https://github.com/kostya/eye/issues/49
(which I was notified of privately via email)
---
Will push and tag 4.8.3 this weekend (along with mailing list change).
lib/unicorn/http_server.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb
index 21cb9a1..a0ca302 100644
--- a/lib/unicorn/http_server.rb
+++ b/lib/unicorn/http_server.rb
@@ -272,7 +272,11 @@ def join
proc_name 'master'
logger.info "master process ready" # test_exec.rb relies on this message
if @ready_pipe
- @ready_pipe.syswrite($$.to_s)
+ begin
+ @ready_pipe.syswrite($$.to_s)
+ rescue => e
+ logger.warn("grandparent died too soon?: #{e.message} (#{e.class})")
+ end
@ready_pipe = @ready_pipe.close rescue nil
end
begin
--
Eric Wong
^ permalink raw reply related [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-05-02 23:15 6% [RFC/PATCH] http_server: handle premature grandparent death Eric Wong
2014-05-04 2:33 7% ` Eric Wong
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).