diff options
author | Christopher Faylor <me@cgf.cx> | 2011-07-04 09:08:28 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-07-04 09:08:28 +0400 |
commit | b9a072504229f9e01bbe1978f36145a986ecec38 (patch) | |
tree | b2cd51910eacefc2ab6a1eed52c0f54ed6d317c6 /winsup/cygwin/fhandler.cc | |
parent | 867649762b1b222e8eac43aa9fbcbac91a16996c (diff) |
* fhandler.cc (fhandler_base::open_with_arch): Call close_on_exec last to avoid
setting close_on_exec for archetype.
* fhandler_tty.cc (fhandler_pty_master::setup): Protect {from,to}_pty handles.
Use consistent naming in debug output. Use inheritable handles and...
(fhandler_pty_master::fixup_after_fork): ...avoid duplicating handles here.
(fhandler_pty_slave::open): Don't set close_on_exec flag here.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 4ea05a59e..fc6679e90 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -453,7 +453,6 @@ int fhandler_base::open_with_arch (int flags, mode_t mode) { int res; - close_on_exec (flags & O_CLOEXEC); if (!(res = (archetype && archetype->io_handle) || open (flags, (mode & 07777) & ~cygheap->umask))) { @@ -480,6 +479,7 @@ fhandler_base::open_with_arch (int flags, mode_t mode) open_setup (flags); } + close_on_exec (flags & O_CLOEXEC); return res; } |