Displaying 2 results from an estimated 2 matches for "init_self_pipe".
2013 Dec 09
2
[PATCH] rework master-to-worker signaling to use a pipe
...# Unicorn::Worker class for the pipe workers use.
SELF_PIPE = []
# signal queue used for self-piping
@@ -127,7 +119,7 @@ class Unicorn::HttpServer
inherit_listeners!
# this pipe is used to wake us up from select(2) in #join when signals
# are trapped. See trap_deferred.
- init_self_pipe!
+ SELF_PIPE.replace(Unicorn.pipe)
# setup signal handlers before writing pid file in case people get
# trigger happy and send signals as soon as the pid file exists.
@@ -306,14 +298,14 @@ class Unicorn::HttpServer
logger.info "master reopening logs..."
Un...
2011 Jun 16
7
[PATCH] replace fchmod()-based heartbeat with raindrops
...worker = Worker.new(worker_nr, Unicorn::TmpIO.new)
+ worker = Worker.new(worker_nr)
before_fork.call(self, worker)
if pid = fork
WORKERS[pid] = worker
@@ -549,10 +544,8 @@ class Unicorn::HttpServer
proc_name "worker[#{worker.nr}]"
START_CTX.clear
init_self_pipe!
- WORKERS.values.each { |other| other.tmp.close rescue nil }
WORKERS.clear
LISTENERS.each { |sock| sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) }
- worker.tmp.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
after_fork.call(self, worker) # can drop perms
worker.user(*user) if us...