aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2004-08-16 22:57:26 +0000
committerRichard M. Stallman2004-08-16 22:57:26 +0000
commit7f916a363e63bdf1874c4f877ec33ec680b5c1b0 (patch)
tree3e4764b855c6207b291c5fb32acca6e799fef11f /src
parentd9639b25df7ed0391cd652ba7fb771a049d93822 (diff)
downloademacs-7f916a363e63bdf1874c4f877ec33ec680b5c1b0.tar.gz
emacs-7f916a363e63bdf1874c4f877ec33ec680b5c1b0.zip
(process_send_signal) [SIGNALS_VIA_CHARACTERS, HAVE_TERMIOS]: Clean up.
Do nothing if the character is CVDISABLE.
Diffstat (limited to 'src')
-rw-r--r--src/process.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/process.c b/src/process.c
index 5e83214f4f9..3c8aca9560e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5549,29 +5549,32 @@ process_send_signal (process, signo, current_group, nomsg)
5549 work. If the system has it, use it. */ 5549 work. If the system has it, use it. */
5550#ifdef HAVE_TERMIOS 5550#ifdef HAVE_TERMIOS
5551 struct termios t; 5551 struct termios t;
5552 cc_t *sig_char = NULL;
5553
5554 tcgetattr (XINT (p->infd), &t);
5552 5555
5553 switch (signo) 5556 switch (signo)
5554 { 5557 {
5555 case SIGINT: 5558 case SIGINT:
5556 tcgetattr (XINT (p->infd), &t); 5559 sig_char = &t.c_cc[VINTR];
5557 send_process (proc, &t.c_cc[VINTR], 1, Qnil); 5560 break;
5558 return;
5559 5561
5560 case SIGQUIT: 5562 case SIGQUIT:
5561 tcgetattr (XINT (p->infd), &t); 5563 sig_char = &t.c_cc[VQUIT];
5562 send_process (proc, &t.c_cc[VQUIT], 1, Qnil); 5564 break;
5563 return;
5564 5565
5565 case SIGTSTP: 5566 case SIGTSTP:
5566 tcgetattr (XINT (p->infd), &t);
5567#if defined (VSWTCH) && !defined (PREFER_VSUSP) 5567#if defined (VSWTCH) && !defined (PREFER_VSUSP)
5568 send_process (proc, &t.c_cc[VSWTCH], 1, Qnil); 5568 sig_char = &t.c_cc[VSWTCH];
5569#else 5569#else
5570 send_process (proc, &t.c_cc[VSUSP], 1, Qnil); 5570 sig_char = &t.c_cc[VSUSP];
5571#endif 5571#endif
5572 return; 5572 break;
5573 } 5573 }
5574 5574
5575 if (sig_char && *sig_char != CVDISABLE)
5576 send_process (proc, sig_char, 1, Qnil);
5577 return;
5575#else /* ! HAVE_TERMIOS */ 5578#else /* ! HAVE_TERMIOS */
5576 5579
5577 /* On Berkeley descendants, the following IOCTL's retrieve the 5580 /* On Berkeley descendants, the following IOCTL's retrieve the