date and time created 88/12/14 15:30:11 by sklower
[unix-history] / usr / src / sys / kern / tty_tty.c
index 7d8f258..882b7f5 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)tty_tty.c   7.1 (Berkeley) %G%
+ *     @(#)tty_tty.c   7.2 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -65,7 +65,13 @@ syioctl(dev, cmd, addr, flag)
        if (cmd == TIOCNOTTY) {
                u.u_ttyp = 0;
                u.u_ttyd = 0;
        if (cmd == TIOCNOTTY) {
                u.u_ttyp = 0;
                u.u_ttyd = 0;
-               u.u_procp->p_pgrp = 0;
+               if (SESS_LEADER(u.u_procp)) {
+                       /* 
+                        * XXX - check posix draft
+                        */
+                       u.u_ttyp->t_session = 0;
+                       u.u_ttyp->t_pgid = 0;
+               }
                return (0);
        }
        if (u.u_ttyp == NULL)
                return (0);
        }
        if (u.u_ttyp == NULL)