]> git.sesse.net Git - vlc/commitdiff
Remove unnecessary complication
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 21 Jan 2008 19:07:37 +0000 (19:07 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 21 Jan 2008 19:07:37 +0000 (19:07 +0000)
src/misc/objects.c

index 483098585b4314a151dc950117e583bfb2bb1b03..68507e5bd051ef3f9d58a8212ca48487dbfdd007 100644 (file)
@@ -567,11 +567,7 @@ vlc_bool_t __vlc_object_wait( vlc_object_t *obj )
     int fd = obj->p_internals->pipes[0];
     if( fd != -1 )
     {
-        if( read( fd, &(char){ 0 }, 1 ) == 0 )
-        {
-            close( fd );
-            obj->p_internals->pipes[1] = -1;
-        }
+        while (read (fd, &(char){ 0 }, 1  < 0));
         return obj->b_die;
     }
 
@@ -660,13 +656,6 @@ void __vlc_object_kill( vlc_object_t *p_this )
         for( int i = 0; i < p_this->i_children ; i++ )
             vlc_object_kill( p_this->pp_children[i] );
 
-    int fd = p_this->p_internals->pipes[1];
-    if( fd != -1 )
-    {
-        close( fd ); /* closing a pipe makes it readable too */
-        p_this->p_internals->pipes[1] = -1;
-    }
-
     vlc_object_signal_unlocked( p_this );
     vlc_mutex_unlock( &p_this->object_lock );
 }