This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH] Cygwin: pty: Fix PTY so that cygwin setup shows help with -h option.
- From: Takashi Yano <takashi dot yano at nifty dot ne dot jp>
- To: cygwin-patches at cygwin dot com
- Cc: Takashi Yano <takashi dot yano at nifty dot ne dot jp>
- Date: Thu, 26 Sep 2019 19:52:46 +0900
- Subject: [PATCH] Cygwin: pty: Fix PTY so that cygwin setup shows help with -h option.
- Dkim-filter: OpenDKIM Filter v2.10.3 conuserg-04.nifty.com x8QAr0R7001416
- After commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57, cygwin
setup fails to show help message when -h option is specified, as
reported in https://cygwin.com/ml/cygwin/2019-09/msg00248.html.
This patch fixes the problem.
---
winsup/cygwin/spawn.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 4d8bcc9fa..f8090a6a4 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -790,8 +790,6 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
NtClose (old_winpid_hdl);
real_path.get_wide_win32_path (myself->progname); // FIXME: race?
sigproc_printf ("new process name %W", myself->progname);
- if (!iscygwin ())
- close_all_files ();
}
else
{
@@ -890,6 +888,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
wait_for_myself ();
}
myself.exit (EXITCODE_NOSET);
+ if (!iscygwin ())
+ close_all_files ();
break;
case _P_WAIT:
case _P_SYSTEM:
--
2.21.0