summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-06-18 23:33:20 +0000
committerJim Blandy <jimb@redhat.com>1993-06-18 23:33:20 +0000
commit5a570e3721ec904cb24436f5fe1e92ec08913e0d (patch)
treeef08d4f7c019ae34d1e764515c870ff270331d5c /src/emacs.c
parent6d68d7937b9a0a79ecaef2dfb264c52fccf0e2ce (diff)
downloademacs-5a570e3721ec904cb24436f5fe1e92ec08913e0d.tar.gz
emacs-5a570e3721ec904cb24436f5fe1e92ec08913e0d.tar.bz2
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/emacs.c')
-rw-r--r--src/emacs.c7
1 files changed, 6 insertions, 1 deletions
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)
/* If we are controlling the terminal, reset terminal modes */
#ifdef EMACS_HAVE_TTY_PGRP
{
+#ifdef USG
+ int pgrp = getpgrp ();
+#else
+ int pgrp = getpgrp (0);
+#endif
int tpgrp;
if (EMACS_GET_TTY_PGRP (0, &tpgrp) != -1
- && tpgrp == getpgrp (0))
+ && tpgrp == pgrp)
{
fflush (stdout);
reset_sys_modes ();