[polypaudio-commits] r542 - /trunk/src/daemon/main.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Feb 20 15:58:51 PST 2006


Author: lennart
Date: Tue Feb 21 00:58:51 2006
New Revision: 542

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=542&root=polypaudio&view=rev
Log:
disable SIGPIPE before calling pa_core_new(), this way the warning message is not printed

Modified:
    trunk/src/daemon/main.c

Modified: trunk/src/daemon/main.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/daemon/main.c?rev=542&root=polypaudio&r1=541&r2=542&view=diff
==============================================================================
--- trunk/src/daemon/main.c (original)
+++ trunk/src/daemon/main.c Tue Feb 21 00:58:51 2006
@@ -357,6 +357,10 @@
         valid_pid_file = 1;
     }
 
+#ifdef SIGPIPE
+    signal(SIGPIPE, SIG_IGN);
+#endif
+    
     mainloop = pa_mainloop_new();
     assert(mainloop);
 
@@ -367,10 +371,17 @@
     assert(r == 0);
     pa_signal_new(SIGINT, signal_callback, c);
     pa_signal_new(SIGTERM, signal_callback, c);
-#ifdef SIGPIPE
-    signal(SIGPIPE, SIG_IGN);
-#endif
-
+
+#ifdef SIGUSR1
+    pa_signal_new(SIGUSR1, signal_callback, c);
+#endif
+#ifdef SIGUSR2
+    pa_signal_new(SIGUSR2, signal_callback, c);
+#endif
+#ifdef SIGHUP
+    pa_signal_new(SIGHUP, signal_callback, c);
+#endif
+    
 #ifdef OS_IS_WIN32
     defer = pa_mainloop_get_api(mainloop)->defer_new(pa_mainloop_get_api(mainloop), message_cb, NULL);
     assert(defer);
@@ -378,16 +389,6 @@
 
     if (conf->daemonize)
         c->running_as_daemon = 1;
-
-#ifdef SIGUSR1
-    pa_signal_new(SIGUSR1, signal_callback, c);
-#endif
-#ifdef SIGUSR2
-    pa_signal_new(SIGUSR2, signal_callback, c);
-#endif
-#ifdef SIGHUP
-    pa_signal_new(SIGHUP, signal_callback, c);
-#endif
 
     oil_init();
     




More information about the pulseaudio-commits mailing list