Yes, sigwait() can fail, so don't ignore its return value
authorRafaël Carré <funman@videolan.org>
Wed, 31 Oct 2007 02:51:23 +0000 (02:51 +0000)
committerRafaël Carré <funman@videolan.org>
Wed, 31 Oct 2007 02:51:23 +0000 (02:51 +0000)
src/vlc.c

index 77dd66f..9d1cee4 100644 (file)
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -236,7 +236,8 @@ static void *SigHandler (void *data)
     for (;;)
     {
         int i_signal, state;
-        (void)sigwait (&fullset, &i_signal);
+        if( sigwait (&fullset, &i_signal) != 0 )
+            continue;
 
 #ifdef __APPLE__
         /* In Mac OS X up to 10.4.8 sigwait (among others) is not a pthread