aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorJim Blandy1992-07-22 18:20:35 +0000
committerJim Blandy1992-07-22 18:20:35 +0000
commit301c3fe461d0e688619965d051296d11800caa13 (patch)
tree4a2efee9e3977ce1abea0723e0888954ec390065 /src/process.c
parent3eac99106c84691923f004e3cd251c358c04276f (diff)
downloademacs-301c3fe461d0e688619965d051296d11800caa13.tar.gz
emacs-301c3fe461d0e688619965d051296d11800caa13.zip
entered into RCS
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/process.c b/src/process.c
index 0d187bd59fe..84d48689d8f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2226,7 +2226,6 @@ process_send_signal (process, signo, current_group, nomsg)
2226 if (NILP (p->pty_flag)) 2226 if (NILP (p->pty_flag))
2227 current_group = Qnil; 2227 current_group = Qnil;
2228 2228
2229#ifdef TIOCGPGRP /* Not sure about this! (fnf) */
2230 /* If we are using pgrps, get a pgrp number and make it negative. */ 2229 /* If we are using pgrps, get a pgrp number and make it negative. */
2231 if (!NILP (current_group)) 2230 if (!NILP (current_group))
2232 { 2231 {
@@ -2251,12 +2250,11 @@ process_send_signal (process, signo, current_group, nomsg)
2251 send_process (proc, &lc.t_suspc, 1); 2250 send_process (proc, &lc.t_suspc, 1);
2252 return Qnil; 2251 return Qnil;
2253 } 2252 }
2254#endif /* have TIOCGLTC and have TIOCGETC */ 2253#endif /* ! defined (TIOCGLTC) && defined (TIOCGETC) */
2255 /* It is possible that the following code would work 2254 /* It is possible that the following code would work
2256 on other kinds of USG systems, not just on the IRIS. 2255 on other kinds of USG systems, not just on the IRIS.
2257 This should be tried in Emacs 19. */ 2256 This should be tried in Emacs 19. */
2258#if defined (IRIS) && defined (HAVE_SETSID) /* Check for Irix, not older 2257#if defined (USG)
2259 systems. */
2260 struct termio t; 2258 struct termio t;
2261 switch (signo) 2259 switch (signo)
2262 { 2260 {
@@ -2273,13 +2271,14 @@ process_send_signal (process, signo, current_group, nomsg)
2273 send_process (proc, &t.c_cc[VSWTCH], 1); 2271 send_process (proc, &t.c_cc[VSWTCH], 1);
2274 return Qnil; 2272 return Qnil;
2275 } 2273 }
2276#endif /* IRIS and HAVE_SETSID */ 2274#endif /* ! defined (USG) */
2277 2275
2276#ifdef TIOCGPGRP
2278 /* Get the pgrp using the tty itself, if we have that. 2277 /* Get the pgrp using the tty itself, if we have that.
2279 Otherwise, use the pty to get the pgrp. 2278 Otherwise, use the pty to get the pgrp.
2280 On pfa systems, saka@pfu.fujitsu.co.JP writes: 2279 On pfa systems, saka@pfu.fujitsu.co.JP writes:
2281 "TICGPGRP symbol defined in sys/ioctl.h at E50. 2280 "TICGPGRP symbol defined in sys/ioctl.h at E50.
2282 But, TIOCGPGRP donot work on E50 ;-P work fine on E60" 2281 But, TIOCGPGRP does not work on E50 ;-P works fine on E60"
2283 His patch indicates that if TIOCGPGRP returns an error, then 2282 His patch indicates that if TIOCGPGRP returns an error, then
2284 we should just assume that p->pid is also the process group id. */ 2283 we should just assume that p->pid is also the process group id. */
2285 { 2284 {
@@ -2293,20 +2292,20 @@ process_send_signal (process, signo, current_group, nomsg)
2293#ifdef pfa 2292#ifdef pfa
2294 if (err == -1) 2293 if (err == -1)
2295 gid = - XFASTINT (p->pid); 2294 gid = - XFASTINT (p->pid);
2296#endif 2295#endif /* ! defined (pfa) */
2297 } 2296 }
2298 if (gid == -1) 2297 if (gid == -1)
2299 no_pgrp = 1; 2298 no_pgrp = 1;
2300 else 2299 else
2301 gid = - gid; 2300 gid = - gid;
2301#else /* ! defined (TIOCGPGRP ) */
2302 /* Can't select pgrps on this system, so we know that
2303 the child itself heads the pgrp. */
2304 gid = - XFASTINT (p->pid);
2305#endif /* ! defined (TIOCGPGRP ) */
2302 } 2306 }
2303 else 2307 else
2304 gid = - XFASTINT (p->pid); 2308 gid = - XFASTINT (p->pid);
2305#else /* not using pgrps */
2306 /* Can't select pgrps on this system, so we know that
2307 the child itself heads the pgrp. */
2308 gid = - XFASTINT (p->pid);
2309#endif /* not using pgrps */
2310 2309
2311 switch (signo) 2310 switch (signo)
2312 { 2311 {
@@ -2319,7 +2318,7 @@ process_send_signal (process, signo, current_group, nomsg)
2319 if (!nomsg) 2318 if (!nomsg)
2320 status_notify (); 2319 status_notify ();
2321 break; 2320 break;
2322#endif 2321#endif /* ! defined (SIGCONT) */
2323 case SIGINT: 2322 case SIGINT:
2324#ifdef VMS 2323#ifdef VMS
2325 send_process (proc, "\003", 1); /* ^C */ 2324 send_process (proc, "\003", 1); /* ^C */
@@ -2357,9 +2356,9 @@ process_send_signal (process, signo, current_group, nomsg)
2357 gid = - XFASTINT (p->pid); 2356 gid = - XFASTINT (p->pid);
2358 kill (gid, signo); 2357 kill (gid, signo);
2359 } 2358 }
2360#else /* no TIOCSIGSEND */ 2359#else /* ! defined (TIOCSIGSEND) */
2361 EMACS_KILLPG (-gid, signo); 2360 EMACS_KILLPG (-gid, signo);
2362#endif 2361#endif /* ! defined (TIOCSIGSEND) */
2363} 2362}
2364 2363
2365DEFUN ("interrupt-process", Finterrupt_process, Sinterrupt_process, 0, 2, 0, 2364DEFUN ("interrupt-process", Finterrupt_process, Sinterrupt_process, 0, 2, 0,