udev: preempt cancellation
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Oct 2009 14:59:09 +0000 (17:59 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Oct 2009 14:59:09 +0000 (17:59 +0300)
modules/services_discovery/udev.c

index 93e0857..14f6d04 100644 (file)
@@ -280,6 +280,7 @@ static void *Run (void *data)
             if (errno != EINTR)
                 break;
 
+        int canc = vlc_savecancel ();
         struct udev_device *dev = udev_monitor_receive_device (mon);
         if (dev == NULL)
             continue;
@@ -295,6 +296,7 @@ static void *Run (void *data)
             AddDevice (sd, dev);
         }
         udev_device_unref (dev);
+        vlc_restorecancel (canc);
     }
     return NULL;
 }