Use ctty instead of just returning. ctty just has a simple open that

returns ENXIO.

Submitted by:	jhb
This commit is contained in:
Martin Blapp 2006-09-27 16:41:15 +00:00
parent cd6dedfc61
commit 1bf5e4b866

View file

@ -67,7 +67,7 @@ ctty_clone(void *arg, struct ucred *cred, char *name, int namelen,
else if (curthread->td_proc->p_session->s_ttyvp->v_type == VBAD ||
curthread->td_proc->p_session->s_ttyvp->v_rdev == NULL) {
/* e.g. s_ttyvp was revoked */
return;
*dev = ctty;
} else
*dev = curthread->td_proc->p_session->s_ttyvp->v_rdev;
dev_ref(*dev);