public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: select: Fix a bug on closing pi->bye event.
@ 2020-08-28 13:25 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2020-08-28 13:25 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c8b076a23361fa9ebaec09d01253043ca2948f24
commit c8b076a23361fa9ebaec09d01253043ca2948f24
Author: Takashi Yano via Cygwin-patches <cygwin-patches@cygwin.com>
Date: Thu Aug 27 18:46:20 2020 +0900
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
Diff:
---
winsup/cygwin/select.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 9f1a8a57a..501714fa7 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -783,8 +783,8 @@ pipe_cleanup (select_record *, select_stuff *stuff)
pi->stop_thread = true;
SetEvent (pi->bye);
pi->thread->detach ();
+ CloseHandle (pi->bye);
}
- CloseHandle (pi->bye);
delete pi;
stuff->device_specific_pipe = NULL;
}
@@ -978,8 +978,8 @@ fifo_cleanup (select_record *, select_stuff *stuff)
pi->stop_thread = true;
SetEvent (pi->bye);
pi->thread->detach ();
+ CloseHandle (pi->bye);
}
- CloseHandle (pi->bye);
delete pi;
stuff->device_specific_fifo = NULL;
}
@@ -1344,8 +1344,8 @@ pty_slave_cleanup (select_record *me, select_stuff *stuff)
pi->stop_thread = true;
SetEvent (pi->bye);
pi->thread->detach ();
+ CloseHandle (pi->bye);
}
- CloseHandle (pi->bye);
delete pi;
stuff->device_specific_ptys = NULL;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-28 13:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 13:25 [newlib-cygwin] Cygwin: select: Fix a bug on closing pi->bye event Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).