Skip to content

Commit

Permalink
daemon: Precisely document signals that cause the monitor to restart.
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Joe Stringer <[email protected]>
  • Loading branch information
blp committed Nov 3, 2013
1 parent 1d5aaa6 commit f67c329
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lib/daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ should_restart(int status)
{
if (WIFSIGNALED(status)) {
static const int error_signals[] = {
/* This list of signals is documented in daemon.man. If you
* change the list, update the documentation too. */
SIGABRT, SIGALRM, SIGBUS, SIGFPE, SIGILL, SIGPIPE, SIGSEGV,
SIGXCPU, SIGXFSZ
};
Expand Down
7 changes: 4 additions & 3 deletions lib/daemon.man
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ run as a background process. \*(DD
\fB\-\-monitor\fR
Creates an additional process to monitor the \fB\*(PN\fR daemon. If
the daemon dies due to a signal that indicates a programming error
(e.g. \fBSIGSEGV\fR, \fBSIGABRT\fR), then the monitor process starts a
new copy of it. If the daemon die or exits for another reason, the
monitor process exits.
(\fBSIGABRT\fR, \fBSIGALRM\fR, \fBSIGBUS\fR, \fBSIGFPE\fR,
\fBSIGILL\fR, \fBSIGPIPE\fR, \fBSIGSEGV\fR, \fBSIGXCPU\fR, or
\fBSIGXFSZ\fR) then the monitor process starts a new copy of it. If
the daemon dies or exits for another reason, the monitor process exits.
.IP
This option is normally used with \fB\-\-detach\fR, but it also
functions without it.
Expand Down

0 comments on commit f67c329

Please sign in to comment.