aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/spawn.cc
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-13 19:25:22 +0900
committerTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-13 19:43:02 +0900
commit8d8724ee1b5aa6a1b080c76a0dec3678136d4981 (patch)
treed80d7c4393c223642c724dfefe251535a62d25f5 /winsup/cygwin/spawn.cc
parent90788821b7d8f48e7f5e31fed68e54856a97b577 (diff)
downloadnewlib-8d8724ee1b5aa6a1b080c76a0dec3678136d4981.zip
newlib-8d8724ee1b5aa6a1b080c76a0dec3678136d4981.tar.gz
newlib-8d8724ee1b5aa6a1b080c76a0dec3678136d4981.tar.bz2
Cygwin: pty: Fix Ctrl-C handling further for non-cygwin apps.
- The recent commit: "Cygwin: pty: Fix Ctrl-C handling for non-cygwin apps in background." causes the problem that cmd.exe is terminated by Ctrl-C even if it is running in pseudo console. This patch fixes the issue.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index bea4d01..b93063d 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -575,6 +575,9 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
c_flags |= CREATE_NEW_PROCESS_GROUP;
refresh_cygheap ();
+ if (c_flags & CREATE_NEW_PROCESS_GROUP)
+ myself->process_state |= PID_NEW_PG;
+
if (mode == _P_DETACH)
/* all set */;
else if (mode != _P_OVERLAY || !my_wr_proc_pipe)