Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-10-06 23:47:45 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-10-06 23:47:45 +0400
commit852908e82d2f5e192113a11ead413214a135293e (patch)
tree4871f5845b8bd14ced1ed386626b8764dac145a9 /winsup
parentefe716bb8eb2a8e34c4b5e5df658221778b4312e (diff)
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Send __SIGSETPGRP
pseudo signal to process group instead of just calling init_console_handler. * sigproc.cc (wait_sig): Call init_console_handler here on __SIGSETPGRP signal. * sigproc.h (__SIGSETPGRP): Define.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/fhandler_termios.cc3
-rw-r--r--winsup/cygwin/sigproc.cc3
-rw-r--r--winsup/cygwin/sigproc.h3
4 files changed, 16 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4e91432d4..dfa8dc309 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,12 @@
+2011-10-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Send __SIGSETPGRP
+ pseudo signal to process group instead of just calling
+ init_console_handler.
+ * sigproc.cc (wait_sig): Call init_console_handler here on __SIGSETPGRP
+ signal.
+ * sigproc.h (__SIGSETPGRP): Define.
+
2011-10-06 Christian Franke <franke@computer.org>
* include/cygwin/wait.h: Use new __wait_status_to_int()
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 708aabe4e..9ea6ae9d8 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -78,7 +78,8 @@ fhandler_termios::tcsetpgrp (const pid_t pgid)
{
case bg_ok:
tc ()->setpgid (pgid);
- init_console_handler (tc ()->is_console);
+ if (tc ()->is_console)
+ tc ()->kill_pgrp (__SIGSETPGRP);
res = 0;
break;
case bg_signalled:
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 26f50f7be..cd27f2642 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1225,6 +1225,9 @@ wait_sig (VOID *)
my_sendsig = NULL;
sigproc_printf ("saw __SIGEXIT");
break; /* handle below */
+ case __SIGSETPGRP:
+ init_console_handler (true);
+ break;
default:
if (pack.si.si_signo < 0)
sig_clear (-pack.si.si_signo);
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index ee6e7d537..f1f6b6463 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -23,7 +23,8 @@ enum
__SIGFLUSHFAST = -(NSIG + 6),
__SIGHOLD = -(NSIG + 7),
__SIGNOHOLD = -(NSIG + 8),
- __SIGEXIT = -(NSIG + 9)
+ __SIGEXIT = -(NSIG + 9),
+ __SIGSETPGRP = -(NSIG + 10)
};
#endif