unicorn.git  about / heads / tags
Rack HTTP server for Unix and fast clients
blob c7c3833c6f44cea8397bc2b68895383865e1538b 1258 bytes (raw)
$ git show v0.2.1:SIGNALS	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
== Signal handling

In general, signals need only be sent to the master process.  However,
the signals unicorn uses internally to communicate with the worker
processes are documented here as well.

=== Master Process

 * HUP - reload config file and gracefully restart all workers
   If preload_app is false (the default), the application code
   will be reloaded when workers are restarted as well.

 * INT/TERM - quick shutdown, kills all workers immediately

 * QUIT - graceful shutdown, waits for workers to finish their
   current request before finishing.

 * USR1 - reopen all logs owned by the master and all workers
   See Unicorn::Util.reopen_logs for what is considered a log.

 * USR2 - reexecute the running binary.  A separate QUIT
   should be sent to the original process once the child is verified to
   be up and running.

=== Worker Processes

Sending signals directly to the worker processes should not normally be
needed.  If the master process is running, any exited worker will be
automatically respawned.

 * INT/TERM - quick shutdown, immediately exit

 * QUIT - gracefully exit after finishing the current request

 * USR1 - reopen all logs owned by the worker process
   See Unicorn::Util.reopen_logs for what is considered a log.

git clone https://yhbt.net/unicorn.git