-/*
- * Sets the tty state to not allow any more changes of foreground process
- * group. This is required to be done so that a subsequent revoke on a vnode
- * is able to always successfully complete.
- *
- * Locks : Assumes tty_lock held on entry
- */
-void
-ttysetpgrphup(struct tty *tp)
-{
- TTY_LOCK_OWNED(tp); /* debug assert */
- SET(tp->t_state, TS_PGRPHUP);
- /*
- * Also wake up sleeping readers which may or may not belong to the
- * current foreground process group.
- *
- * This forces any non-fg readers (which entered read when
- * that process group was in the fg) to return with EIO (if they're
- * catching SIGTTIN or with SIGTTIN). The ones which do belong to the fg
- * process group will promptly go back to sleep and get a SIGHUP shortly
- * This would normally happen as part of the close in revoke but if
- * there is a sleeping reader from a non-fg process group we never get
- * to the close because the sleeping reader holds an iocount on the
- * vnode of the terminal which is going to get revoked->reclaimed.
- */
- wakeup(TSA_HUP_OR_INPUT(tp));
-}
-
-/*
- * Locks : Assumes tty lock held on entry
- */
-void
-ttyclrpgrphup(struct tty *tp)
-{
- TTY_LOCK_OWNED(tp); /* debug assert */
- CLR(tp->t_state, TS_PGRPHUP);
-}
-