[pulseaudio-commits] r2004 - /trunk/src/pulse/mainloop-signal.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Oct 30 11:35:09 PDT 2007


Author: lennart
Date: Tue Oct 30 19:35:08 2007
New Revision: 2004

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2004&root=pulseaudio&view=rev
Log:
save and restore errno in the sig handler

Modified:
    trunk/src/pulse/mainloop-signal.c

Modified: trunk/src/pulse/mainloop-signal.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/mainloop-signal.c?rev=2004&root=pulseaudio&r1=2003&r2=2004&view=diff
==============================================================================
--- trunk/src/pulse/mainloop-signal.c (original)
+++ trunk/src/pulse/mainloop-signal.c Tue Oct 30 19:35:08 2007
@@ -67,10 +67,16 @@
 static pa_signal_event *signals = NULL;
 
 static void signal_handler(int sig) {
+    int saved_errno;
+
+    saved_errno = errno;
+
 #ifndef HAVE_SIGACTION
     signal(sig, signal_handler);
 #endif
     pa_write(signal_pipe[1], &sig, sizeof(sig), NULL);
+
+    errno = saved_errno;
 }
 
 static void dispatch(pa_mainloop_api*a, int sig) {




More information about the pulseaudio-commits mailing list