Skip to content

Commit

Permalink
document signals
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Dec 2, 2011
1 parent 0843b0d commit 4b26bf5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
21 changes: 15 additions & 6 deletions bin/starman
Expand Up @@ -201,7 +201,7 @@ Starman server runninng in the debug mode.
=item HUP
Sending HUP signal to the master process will restart all the workers
Sending C<HUP> signal to the master process will restart all the workers
gracefully (meaning the currently running requests will shut down once
the request is complete), and by default, the workers will pick up the
code changes you make by reloading the application.
Expand All @@ -210,17 +210,26 @@ If you enable C<--preload-app> option, however, the code will be only
loaded in the startup process and will not pick up the code changes
you made. If you want to preload the app I<and> do graceful restarts
by reloading the code changes, you're recommended to use
L<Server::Starter>.
L<Server::Starter>, configured to send C<QUIT> signal when superdaemon
received C<HUP>, i.e:
start_server --port 8080 --signal-on-hup=QUIT -- starman --preload-app myapp.psgi
=item TTIN, TTOU
Sending TTIN signal to the master process will dynamically increase
the number of workers, and TTOU signal will decrease it.
Sending C<TTIN> signal to the master process will dynamically increase
the number of workers, and C<TTOU> signal will decrease it.
=item INT, TERM
Sending INT or TERM signal to the master process will kill all the
workers immediately and shut down the server.
Sending C<INT> or C<TERM> signal to the master process will kill all
the workers immediately and shut down the server.
=item QUIT
Sending C<QUIT> signal to the master process will gracefully shutdown
the workers (meaning the currently running requests will shut down
once the request is complete).
=back
Expand Down
3 changes: 2 additions & 1 deletion lib/Starman.pm
Expand Up @@ -45,7 +45,8 @@ worker pool.
=item Signals
Supports C<HUP> for graceful worker restarts, and C<TTIN>/C<TTOU> to
dynamically increase or decrease the number of worker processes.
dynamically increase or decrease the number of worker processes, as
well as C<QUIT> to gracefully shutdown the worker processes.
=item Superdaemon aware
Expand Down

0 comments on commit 4b26bf5

Please sign in to comment.