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
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 8a82f8a11..5d60823b3 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -465,7 +465,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
PCA service. However, a process which is controlled by PCA is part
of a compatibility job, which allows child processes to break away
from the job. This helps to avoid this issue.
-
+
(*) Note that this is not mintty's fault. It has just been observed
with mintty in the first place. See the archives for more info:
http://cygwin.com/ml/cygwin-developers/2012-02/msg00018.html */
@@ -746,7 +746,7 @@ loop:
/* Reset handle inheritance to default when the execution of a non-Cygwin
process fails. Only need to do this for _P_OVERLAY since the handle will
be closed otherwise. Don't need to do this for 'parent' since it will
- be closed in every case. See FIXME above. */
+ be closed in every case. See FIXME above. */
if (!iscygwin () && mode == _P_OVERLAY)
SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
if (wr_proc_pipe == my_wr_proc_pipe)
@@ -867,7 +867,8 @@ loop:
}
else
{
- close_all_files (true);
+ if (iscygwin ())
+ close_all_files (true);
if (!my_wr_proc_pipe
&& WaitForSingleObject (pi.hProcess, 0) == WAIT_TIMEOUT)
wait_for_myself ();