In message <[EMAIL PROTECTED]>, "Peter Edwards" writes:
>The problem is in kern/tty_tty.c:ctty_clone. It's assuming that if the process
>has its P_CONTROLT flag set, then it's session has a valid vnode for it's
>controlling terminal. This doesn't hold if the terminal was revoked.
Can you try this patch ?
Index: tty_tty.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/tty_tty.c,v
retrieving revision 1.46
diff -u -r1.46 tty_tty.c
--- tty_tty.c 19 Jan 2003 11:03:07 -0000 1.46
+++ tty_tty.c 25 Jan 2003 19:39:15 -0000
@@ -70,10 +70,12 @@
return;
if (strcmp(name, "tty"))
return;
- if (curthread->td_proc->p_flag & P_CONTROLT)
- *dev = curthread->td_proc->p_session->s_ttyvp->v_rdev;
- else
+ if (!(curthread->td_proc->p_flag & P_CONTROLT))
+ *dev = ctty;
+ else if (curthread->td_proc->p_session->s_ttyvp == NULL)
*dev = ctty;
+ else
+ *dev = curthread->td_proc->p_session->s_ttyvp->v_rdev;
}
static void
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message