Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_proc.c
Show First 20 Lines • Show All 939 Lines • ▼ Show 20 Lines | if (SESS_LEADER(p)) { | ||||
* Because the TTY may have been revoked in the mean | * Because the TTY may have been revoked in the mean | ||||
* time and could already have a new session associated | * time and could already have a new session associated | ||||
* with it, make sure we don't send a SIGHUP to a | * with it, make sure we don't send a SIGHUP to a | ||||
* foreground process group that does not belong to this | * foreground process group that does not belong to this | ||||
* session. | * session. | ||||
*/ | */ | ||||
if (tp != NULL) { | if (tp != NULL) { | ||||
tty_lock(tp); | ttydisc_lock(tp); | ||||
if (tp->t_session == sp) | if (tp->t_session == sp) | ||||
tty_signal_pgrp(tp, SIGHUP); | tty_signal_pgrp(tp, SIGHUP); | ||||
tty_unlock(tp); | ttydisc_unlock(tp); | ||||
} | } | ||||
if (ttyvp != NULL) { | if (ttyvp != NULL) { | ||||
sx_xunlock(&proctree_lock); | sx_xunlock(&proctree_lock); | ||||
if (vn_lock(ttyvp, LK_EXCLUSIVE) == 0) { | if (vn_lock(ttyvp, LK_EXCLUSIVE) == 0) { | ||||
VOP_REVOKE(ttyvp, REVOKEALL); | VOP_REVOKE(ttyvp, REVOKEALL); | ||||
VOP_UNLOCK(ttyvp); | VOP_UNLOCK(ttyvp); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,679 Lines • Show Last 20 Lines |