[pulseaudio-discuss] [PATCH] daemon: Exit with code 0 on SIGINT and SIGTERM

Peter Meerwald pmeerw at pmeerw.net
Wed May 20 16:40:09 PDT 2015


see https://bugs.freedesktop.org/show_bug.cgi?id=86818

an exit code of 1 makes systemd believe that the service failed;
better return 0 to denote that PA sucessfully stopped on the user's
request

sidenote: systemd's SuccessExitStatus= could be used to turn code 1 into a
code denoting success

Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
Cc: jan.steffens at gmail.com
---
 src/daemon/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/daemon/main.c b/src/daemon/main.c
index deb1e43..82dec01 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -140,7 +140,7 @@ static void signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void
         case SIGTERM:
         default:
             pa_log_info("Exiting.");
-            m->quit(m, 1);
+            m->quit(m, 0);
             break;
     }
 }
-- 
1.9.1



More information about the pulseaudio-discuss mailing list