Changes for Irix 4.0, tested this time:
[bpt/emacs.git] / src / emacs.c
index c38811f..96040e1 100644 (file)
@@ -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 ();