From f67c329519d9a2773dcb1553da1f88be08ba016e Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 11 Oct 2013 16:52:50 -0700 Subject: [PATCH] daemon: Precisely document signals that cause the monitor to restart. Signed-off-by: Ben Pfaff Acked-by: Joe Stringer --- lib/daemon.c | 2 ++ lib/daemon.man | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/daemon.c b/lib/daemon.c index 1c9ebe257..54641d078 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -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 }; diff --git a/lib/daemon.man b/lib/daemon.man index 7b07cb81d..00de1a316 100644 --- a/lib/daemon.man +++ b/lib/daemon.man @@ -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. -- 2.43.0