Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-04-22 14:26:37 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-04-22 14:26:37 +0300
commit46077e809d15ea008576b305799e476ee80d5474 (patch)
tree07fa84eda0bce399ad41fa4e3282a03931a372cd /winsup
parent063e7da36fda3f42619d7df606d9f3d4920605aa (diff)
Fix closing too many handles in pty fchown/fchmod
* fhandler_tty.cc (fhandler_pty_slave::fch_close_handles): Don't close handles not opened via fhandler_pty_slave::fch_open_handles. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_tty.cc3
2 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 400b67e7a..ee7b7a459 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_tty.cc (fhandler_pty_slave::fch_close_handles): Don't close
+ handles not opened via fhandler_pty_slave::fch_open_handles.
+
2015-04-22 Takashi Yano <takashi.yano@nifty.ne.jp>
* fhandler.h (class fhandler_base): Add virtual function
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index d6b2e194d..e91b3e398 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1140,9 +1140,6 @@ fhandler_pty_slave::fch_set_sd (security_descriptor &sd, bool chown)
void
fhandler_pty_slave::fch_close_handles ()
{
- close_maybe (get_io_handle ());
- close_maybe (get_output_handle ());
- close_maybe (get_output_handle_cyg ());
close_maybe (input_available_event);
close_maybe (output_mutex);
close_maybe (input_mutex);