aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorTakashi Yano via Cygwin-patches <cygwin-patches@cygwin.com>2020-08-27 18:46:20 +0900
committerCorinna Vinschen <corinna@vinschen.de>2020-08-28 15:24:22 +0200
commitc8b076a23361fa9ebaec09d01253043ca2948f24 (patch)
tree85ddbe62f0bb3904347002715fc788ab53a96777 /winsup
parent7c963c7ba030b9e110eefd6412eff4d6189f29e7 (diff)
downloadnewlib-c8b076a23361fa9ebaec09d01253043ca2948f24.zip
newlib-c8b076a23361fa9ebaec09d01253043ca2948f24.tar.gz
newlib-c8b076a23361fa9ebaec09d01253043ca2948f24.tar.bz2
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
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/select.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 9f1a8a5..501714f 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;
}