diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2019-10-16 21:34:08 +0900 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2019-10-16 15:15:47 -0400 |
commit | 9bedd6807dc3a1ad6c80e62a6a7aae27ca769de0 (patch) | |
tree | a8febfd40d89a694d74ebb9d0c5b58aad2443d56 | |
parent | 9e06ba1ac310c5a2392bb9d150e4686bbb118d6c (diff) | |
download | cygnal-9bedd6807dc3a1ad6c80e62a6a7aae27ca769de0.tar.gz cygnal-9bedd6807dc3a1ad6c80e62a6a7aae27ca769de0.tar.bz2 cygnal-9bedd6807dc3a1ad6c80e62a6a7aae27ca769de0.zip |
Cygwin: pty: Avoid detach console in the process running as service.
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1095c82eb..dbb035ff3 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1048,6 +1048,8 @@ fhandler_pty_slave::try_reattach_pcon (void) /* Do not detach from the console because re-attaching will fail if helper process is running as service account. */ + if (get_ttyp()->attach_pcon_in_fork) + return false; if (pcon_attached_to >= 0 && cygwin_shared->tty[pcon_attached_to]->attach_pcon_in_fork) return false; |