diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2019-09-26 13:52:46 +0300 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2019-09-26 15:42:52 +0300 |
commit | e1a0775dc0545b5f9c81b09a327fc110c538b7b4 (patch) | |
tree | 42878a60ded276050b70cb66f7a0b303f897e76b | |
parent | 7e9b1550fd1c9690bc560404388ba4907d10996a (diff) |
Cygwin: pty: Fix PTY so that cygwin setup shows help with -h option.
- 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.
-rw-r--r-- | winsup/cygwin/spawn.cc | 4 |
1 files 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: |