diff options
| author | Jim Blandy | 1993-06-18 23:33:20 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-06-18 23:33:20 +0000 |
| commit | 5a570e3721ec904cb24436f5fe1e92ec08913e0d (patch) | |
| tree | ef08d4f7c019ae34d1e764515c870ff270331d5c /src | |
| parent | 6d68d7937b9a0a79ecaef2dfb264c52fccf0e2ce (diff) | |
| download | emacs-5a570e3721ec904cb24436f5fe1e92ec08913e0d.tar.gz emacs-5a570e3721ec904cb24436f5fe1e92ec08913e0d.zip | |
Changes for Irix 4.0, tested this time:
* s/irix4-0.h: Get rid of our fake definitions for setpgrp and
getpgrp.
* callproc.c (Fcall_process): Go ahead and use the USG calling
convention for setpgrp.
* ymakefile (pre-crt0.o): Add rule for this. Perhaps it will help
separate-source-directory compilation.
* emacs.c (shut_down_emacs): Some USG systems #define
EMACS_HAVE_TTY_PGRP; call getpgrp as appropriate for such systems.
* sysdep.c (sys_suspend): Call getpgrp as appropriate for USG and
non-USG.
* process.c [IRIX] (create_process): Don't put child in process
group zero before opening the tty; Irix is like USG in this
regard.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 2 | ||||
| -rw-r--r-- | src/emacs.c | 7 | ||||
| -rw-r--r-- | src/process.c | 2 | ||||
| -rw-r--r-- | src/s/irix4-0.h | 4 | ||||
| -rw-r--r-- | src/sysdep.c | 9 |
5 files changed, 16 insertions, 8 deletions
diff --git a/src/callproc.c b/src/callproc.c index 1436a231d72..28e6c00377c 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -255,7 +255,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 255 | { | 255 | { |
| 256 | if (fd[0] >= 0) | 256 | if (fd[0] >= 0) |
| 257 | close (fd[0]); | 257 | close (fd[0]); |
| 258 | #if defined (USG) && !defined (IRIX) | 258 | #ifdef USG |
| 259 | setpgrp (); | 259 | setpgrp (); |
| 260 | #else | 260 | #else |
| 261 | setpgrp (pid, pid); | 261 | setpgrp (pid, pid); |
diff --git a/src/emacs.c b/src/emacs.c index c38811f117d..96040e17a86 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -681,9 +681,14 @@ shut_down_emacs (sig, no_x, stuff) | |||
| 681 | /* If we are controlling the terminal, reset terminal modes */ | 681 | /* If we are controlling the terminal, reset terminal modes */ |
| 682 | #ifdef EMACS_HAVE_TTY_PGRP | 682 | #ifdef EMACS_HAVE_TTY_PGRP |
| 683 | { | 683 | { |
| 684 | #ifdef USG | ||
| 685 | int pgrp = getpgrp (); | ||
| 686 | #else | ||
| 687 | int pgrp = getpgrp (0); | ||
| 688 | #endif | ||
| 684 | int tpgrp; | 689 | int tpgrp; |
| 685 | if (EMACS_GET_TTY_PGRP (0, &tpgrp) != -1 | 690 | if (EMACS_GET_TTY_PGRP (0, &tpgrp) != -1 |
| 686 | && tpgrp == getpgrp (0)) | 691 | && tpgrp == pgrp) |
| 687 | { | 692 | { |
| 688 | fflush (stdout); | 693 | fflush (stdout); |
| 689 | reset_sys_modes (); | 694 | reset_sys_modes (); |
diff --git a/src/process.c b/src/process.c index 87697342b11..4c2fa5d7c00 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1282,7 +1282,7 @@ create_process (process, new_argv, current_dir) | |||
| 1282 | int j = open ("/dev/tty", O_RDWR, 0); | 1282 | int j = open ("/dev/tty", O_RDWR, 0); |
| 1283 | ioctl (j, TIOCNOTTY, 0); | 1283 | ioctl (j, TIOCNOTTY, 0); |
| 1284 | close (j); | 1284 | close (j); |
| 1285 | #if !defined (USG) || defined (IRIX) | 1285 | #ifndef USG |
| 1286 | /* In order to get a controlling terminal on some versions | 1286 | /* In order to get a controlling terminal on some versions |
| 1287 | of BSD, it is necessary to put the process in pgrp 0 | 1287 | of BSD, it is necessary to put the process in pgrp 0 |
| 1288 | before it opens the terminal. */ | 1288 | before it opens the terminal. */ |
diff --git a/src/s/irix4-0.h b/src/s/irix4-0.h index e2dbb37c37c..589773a8213 100644 --- a/src/s/irix4-0.h +++ b/src/s/irix4-0.h | |||
| @@ -50,10 +50,6 @@ | |||
| 50 | strcpy (pty_name, name); \ | 50 | strcpy (pty_name, name); \ |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | /* Use the BSD versions of the getpgrp and setpgrp functions. */ | ||
| 54 | #define setpgrp(pid, pgrp) BSDsetpgrp((pid), (pgrp)) | ||
| 55 | #define getpgrp(pid) BSDgetpgrp(pid) | ||
| 56 | |||
| 57 | /* jpff@maths.bath.ac.uk reports `struct exception' is not defined | 53 | /* jpff@maths.bath.ac.uk reports `struct exception' is not defined |
| 58 | on this system, so inhibit use of matherr. */ | 54 | on this system, so inhibit use of matherr. */ |
| 59 | #define NO_MATHERR | 55 | #define NO_MATHERR |
diff --git a/src/sysdep.c b/src/sysdep.c index 5d0d4802a0f..8e7858f23d4 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -571,7 +571,14 @@ sys_suspend () | |||
| 571 | #else | 571 | #else |
| 572 | #ifdef SIGTSTP | 572 | #ifdef SIGTSTP |
| 573 | 573 | ||
| 574 | EMACS_KILLPG (getpgrp (0), SIGTSTP); | 574 | { |
| 575 | #ifdef USG | ||
| 576 | int pgrp = getpgrp (); | ||
| 577 | #else | ||
| 578 | int pgrp = getpgrp (0); | ||
| 579 | #endif | ||
| 580 | EMACS_KILLPG (pgrp, SIGTSTP); | ||
| 581 | } | ||
| 575 | 582 | ||
| 576 | #else /* No SIGTSTP */ | 583 | #else /* No SIGTSTP */ |
| 577 | #ifdef USG_JOBCTRL /* If you don't know what this is don't mess with it */ | 584 | #ifdef USG_JOBCTRL /* If you don't know what this is don't mess with it */ |