From a49c79e807843bbd87961b3d4b81ea79076c043e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 27 Dec 2013 15:27:24 -0500 Subject: [PATCH] man: add a note about propagating signals --- man/systemd.service.xml | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 71bcfb4..af3e0f2 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -734,22 +734,33 @@ ExecStart=/bin/echo $ONE $TWO ${TWO} considered successful termination, in addition to the normal successful exit code 0 and the signals SIGHUP, SIGINT, - SIGTERM and SIGPIPE. Exit status + SIGTERM, and SIGPIPE. Exit status definitions can either be numeric exit codes or termination signal names, - separated by spaces. Example: - SuccessExitStatus=1 2 8 - SIGKILL, ensures that exit - codes 1, 2, 8 and the termination - signal SIGKILL are considered clean - service terminations. This option may - appear more than once in which case - the list of successful exit statuses - is merged. If the empty string is - assigned to this option, the list is - reset, all prior assignments of this - option will have no - effect. + separated by spaces. For example: + SuccessExitStatus=1 2 8 SIGKILL + ensures that exit codes 1, 2, 8 and + the termination signal + SIGKILL are + considered clean service terminations. + + + Note that if a process has a + signal handler installed and exits by + calling + _exit2 + in response to a signal, the + information about the signal is lost. + Programs should instead perform cleanup and kill themselves with the same signal instead. See + Proper handling of SIGINT/SIGQUIT — How to be a proper program. + + This option may appear more than once + in which case the list of successful + exit statuses is merged. If the empty + string is assigned to this option, the + list is reset, all prior assignments + of this option will have no + effect.