diff options
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; } |