Displaying 1 result from an estimated 1 matches for "old_cb".
Did you mean:
old_ce
2013 Dec 09
2
[PATCH] rework master-to-worker signaling to use a pipe
...# We do not use the more obvious Process.kill(sig, $$) here since
+ # that signal delivery may be deferred. We want to avoid signal delivery
+ # while the Rack app.call is running because some database drivers
+ # (e.g. ruby-pg) may cancel pending requests.
+ def fake_sig(sig) # :nodoc:
+ old_cb = trap(sig, "IGNORE")
+ old_cb.call
+ ensure
+ trap(sig, old_cb)
+ end
+
+ # master sends fake signals to children
+ def soft_kill(sig) # :nodoc:
+ case sig
+ when Integer
+ signum = sig
+ else
+ signum = Signal.list[sig.to_s] or
+ raise ArgumentError...