signals: exit properly
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 31 May 2008 15:58:21 +0000 (18:58 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 31 May 2008 16:01:04 +0000 (19:01 +0300)
modules/control/signals.c

index 5180aa7..b66ba49 100644 (file)
@@ -126,8 +126,10 @@ static void Run (intf_thread_t *obj)
     intf_sys_t *p_sys = obj->p_sys;
 
     vlc_object_lock (obj);
-    do
+    while (vlc_object_alive (obj))
     {
+        vlc_object_wait (obj);
+
         switch (p_sys->signum)
         {
             case SIGINT:
@@ -139,7 +141,6 @@ static void Run (intf_thread_t *obj)
                 goto out;
         }
     }
-    while (!vlc_object_wait (obj));
 
 out:
     vlc_object_unlock (obj);