Commit 871a8bb5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Flawed logic

parent 348da1fd
......@@ -412,12 +412,14 @@ int vlc_object_waitpipe( vlc_object_t *obj )
assert (internals->pipes[1] == -1);
#ifdef HAVE_EVENTFD
if ((internals->pipes[0] = internals->pipes[1] = eventfd (0, 0)) == -1)
if ((internals->pipes[0] = eventfd (0, 0)) == -1)
#endif
{
if (pipe (internals->pipes))
internals->pipes[0] = internals->pipes[1] = -1;
else
if (obj->b_die)
}
if (internals->pipes[0] != -1 && obj->b_die)
{ /* Race condition: vlc_object_kill() already invoked! */
msg_Dbg (obj, "waitpipe: object already dying");
write (internals->pipes[1], &(uint64_t){ 1 }, sizeof (uint64_t));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment