X-Git-Url: https://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=blobdiff_plain;f=src%2Fmisc%2Fobjects.c;h=68507e5bd051ef3f9d58a8212ca48487dbfdd007;hp=483098585b4314a151dc950117e583bfb2bb1b03;hb=6cf8fa760d1f3afe48de362fa20d06daec80e9b8;hpb=cc227c7270cfc3ba47f988df3cdaf232a41a8f34 diff --git a/src/misc/objects.c b/src/misc/objects.c index 483098585b..68507e5bd0 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -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 ); }