diff options
author | Christopher Faylor <me@cgf.cx> | 2009-08-18 19:21:47 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-08-18 19:21:47 +0400 |
commit | 421ba492fa95161ec0f42b51303411142e1a0360 (patch) | |
tree | 91b3e67e7272f16f07a0147ada48bf4b20035bf4 /winsup/cygwin/dtable.cc | |
parent | 4db8460fdb8304be56cfacbb36cd3c6bf7da2cb6 (diff) |
* dtable.cc (dtable::fixup_after_exec): Close any popen'ed file handles here.
* fhandler.h (fhandler_*::ispipe): New function.
(fhandler_base::get_popen_pid): Define virtual function.
(fhandler_*::isdevice): Make const.
(fhandler_*::isfifo): Ditto.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r-- | winsup/cygwin/dtable.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 3789ff50e..8783a6270 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -753,6 +753,8 @@ dtable::fixup_after_exec () } release (i); } + else if (fh->get_popen_pid ()) + close (i); else if (i == 0) SetStdHandle (std_consts[i], fh->get_io_handle ()); else if (i <= 2) |