From: Zbigniew Jędrzejewski-Szmek Date: Fri, 14 Sep 2018 14:02:48 +0000 (+0200) Subject: man: add a description of systemctl return codes X-Git-Tag: v240~686^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23a9ffb0935b6814c6b267fe22f94f1436bb7a5e;p=platform%2Fupstream%2Fsystemd.git man: add a description of systemctl return codes Fixes #10056. --- diff --git a/man/systemctl.xml b/man/systemctl.xml index e12e50d..2bf2014 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1940,8 +1940,56 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err Exit status - On success, 0 is returned, a non-zero failure - code otherwise. + On success, 0 is returned, a non-zero failure code otherwise. + + systemctl uses the return codes defined by LSB, as defined in + LSB 3.0.0. + + + + LSB return codes + + + + + Value + Description in LSB + Use in systemd + + + + + 0 + "program is running or service is OK" + unit is active + + + 1 + "program is dead and /var/run pid file exists" + unit not failed (used by is-failed) + + + 2 + "program is dead and /var/lock lock file exists" + unused + + + 3 + "program is not running" + unit is not active + + + 4 + "program or service status is unknown" + no such unit + + + +
+ + The mapping of LSB service states to systemd unit states is imperfect, so it is better to + not rely on those return values but to look for specific unit states and substates instead. +