* 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%
*/
/*
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)