Cygwin: select: Fix a bug on closing pi->bye event.
- Close event handle pi->bye only if it was created. Addresses: https://cygwin.com/pipermail/cygwin-developers/2020-August/011948.html
This commit is contained in:
parent
7c963c7ba0
commit
c8b076a233
@ -783,8 +783,8 @@ pipe_cleanup (select_record *, select_stuff *stuff)
|
|||||||
pi->stop_thread = true;
|
pi->stop_thread = true;
|
||||||
SetEvent (pi->bye);
|
SetEvent (pi->bye);
|
||||||
pi->thread->detach ();
|
pi->thread->detach ();
|
||||||
}
|
|
||||||
CloseHandle (pi->bye);
|
CloseHandle (pi->bye);
|
||||||
|
}
|
||||||
delete pi;
|
delete pi;
|
||||||
stuff->device_specific_pipe = NULL;
|
stuff->device_specific_pipe = NULL;
|
||||||
}
|
}
|
||||||
@ -978,8 +978,8 @@ fifo_cleanup (select_record *, select_stuff *stuff)
|
|||||||
pi->stop_thread = true;
|
pi->stop_thread = true;
|
||||||
SetEvent (pi->bye);
|
SetEvent (pi->bye);
|
||||||
pi->thread->detach ();
|
pi->thread->detach ();
|
||||||
}
|
|
||||||
CloseHandle (pi->bye);
|
CloseHandle (pi->bye);
|
||||||
|
}
|
||||||
delete pi;
|
delete pi;
|
||||||
stuff->device_specific_fifo = NULL;
|
stuff->device_specific_fifo = NULL;
|
||||||
}
|
}
|
||||||
@ -1344,8 +1344,8 @@ pty_slave_cleanup (select_record *me, select_stuff *stuff)
|
|||||||
pi->stop_thread = true;
|
pi->stop_thread = true;
|
||||||
SetEvent (pi->bye);
|
SetEvent (pi->bye);
|
||||||
pi->thread->detach ();
|
pi->thread->detach ();
|
||||||
}
|
|
||||||
CloseHandle (pi->bye);
|
CloseHandle (pi->bye);
|
||||||
|
}
|
||||||
delete pi;
|
delete pi;
|
||||||
stuff->device_specific_ptys = NULL;
|
stuff->device_specific_ptys = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user