public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Ken Brown <kbrown@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: pty: Fix PTY so that cygwin setup shows help with -h option.
Date: Thu, 26 Sep 2019 12:49:00 -0000	[thread overview]
Message-ID: <20190926124914.70362.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e1a0775dc0545b5f9c81b09a327fc110c538b7b4

commit e1a0775dc0545b5f9c81b09a327fc110c538b7b4
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Thu Sep 26 19:52:46 2019 +0900

    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.

Diff:
---
 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 4d8bcc9..f8090a6 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:


                 reply	other threads:[~2019-09-26 12:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190926124914.70362.qmail@sourceware.org \
    --to=kbrown@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).