changeset 3810:87d9ef5f831b

* callproc.c (Fcall_process, child_setup): If IRIX is #defined, call setpgrp with arguments, even if USG is #defined. * process.c [IRIX] (create_process): Don't call setpgrp before opening the pty. Call it after doing the TIOCNOTTY ioctl.
author Jim Blandy <jimb@redhat.com>
date Thu, 17 Jun 1993 22:03:06 +0000
parents 0f579c7269a3
children 48b1ef149180
files src/callproc.c src/process.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/callproc.c	Thu Jun 17 21:23:29 1993 +0000
+++ b/src/callproc.c	Thu Jun 17 22:03:06 1993 +0000
@@ -255,7 +255,7 @@
       {
 	if (fd[0] >= 0)
 	  close (fd[0]);
-#ifdef USG
+#if defined (USG) && !defined (IRIX)
         setpgrp ();
 #else
         setpgrp (pid, pid);
@@ -519,7 +519,7 @@
   close (out);
   close (err);
 
-#ifdef USG
+#if defined (USG) && !defined (IRIX)
   setpgrp ();			/* No arguments but equivalent in this case */
 #else
   setpgrp (pid, pid);
--- a/src/process.c	Thu Jun 17 21:23:29 1993 +0000
+++ b/src/process.c	Thu Jun 17 22:03:06 1993 +0000
@@ -1265,7 +1265,7 @@
 	  ioctl (xforkin, TIOCSCTTY, 0);
 #endif
 #else /* not HAVE_SETSID */
-#ifdef USG
+#if defined (USG) && !defined (IRIX)
 	/* It's very important to call setpgrp() here and no time
 	   afterwards.  Otherwise, we lose our controlling tty which
 	   is set when we open the pty. */
@@ -1282,7 +1282,7 @@
 	    int j = open ("/dev/tty", O_RDWR, 0);
 	    ioctl (j, TIOCNOTTY, 0);
 	    close (j);
-#ifndef USG
+#if !defined (USG) || defined (IRIX)
 	    /* In order to get a controlling terminal on some versions
 	       of BSD, it is necessary to put the process in pgrp 0
 	       before it opens the terminal.  */