summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 86c6b4df6..4060a3819 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -785,7 +785,7 @@ fhandler_base::lseek (off_t offset, int whence)
}
int
-fhandler_base::close (void)
+fhandler_base::close ()
{
int res = -1;
@@ -1317,8 +1317,8 @@ out:
int
fhandler_disk_file::close ()
{
- int res;
- if ((res = this->fhandler_base::close ()) == 0)
+ int res = this->fhandler_base::close ();
+ if (!res)
cygwin_shared->delqueue.process_queue ();
return res;
}
@@ -1545,6 +1545,7 @@ fhandler_base::set_inheritance (HANDLE &h, int not_inheriting, const char *namep
h = newh;
ProtectHandle2 (h, name);
}
+ setclexec_pid (h, not_inheriting);
#endif
}