summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-07-05 04:48:01 +0000
committerguenther <guenther@openbsd.org>2011-07-05 04:48:01 +0000
commit2725dadd7d788089a9902b44feabed3569fc8616 (patch)
tree247079b02db228e6a9ab47389f8b56deba8cab5f /sys/kern/tty.c
parentSync to bsd.lv (all coded by kristaps@): (diff)
downloadwireguard-openbsd-2725dadd7d788089a9902b44feabed3569fc8616.tar.xz
wireguard-openbsd-2725dadd7d788089a9902b44feabed3569fc8616.zip
Recommit the reverted sigacts change now that the NFS use-after-free
problem has been tracked down. This fixes the sharing of the signal handling state: shared bits go in sigacts, per-rthread bits goes in struct proc. ok deraadt@
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index a56d88c258d..1a918c29714 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.92 2011/07/02 22:20:08 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.93 2011/07/05 04:48:02 guenther Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -750,7 +750,7 @@ ttioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
#endif
while (isbackground(pr, tp) &&
(pr->ps_flags & PS_PPWAIT) == 0 &&
- (p->p_sigignore & sigmask(SIGTTOU)) == 0 &&
+ (p->p_sigacts->ps_sigignore & sigmask(SIGTTOU)) == 0 &&
(p->p_sigmask & sigmask(SIGTTOU)) == 0) {
if (pr->ps_pgrp->pg_jobc == 0)
return (EIO);
@@ -1462,7 +1462,7 @@ loop: lflag = tp->t_lflag;
* Hang process if it's in the background.
*/
if (isbackground(pr, tp)) {
- if ((p->p_sigignore & sigmask(SIGTTIN)) ||
+ if ((p->p_sigacts->ps_sigignore & sigmask(SIGTTIN)) ||
(p->p_sigmask & sigmask(SIGTTIN)) ||
pr->ps_flags & PS_PPWAIT || pr->ps_pgrp->pg_jobc == 0) {
error = EIO;
@@ -1719,7 +1719,7 @@ loop:
pr = p->p_p;
if (isbackground(pr, tp) &&
ISSET(tp->t_lflag, TOSTOP) && (pr->ps_flags & PS_PPWAIT) == 0 &&
- (p->p_sigignore & sigmask(SIGTTOU)) == 0 &&
+ (p->p_sigacts->ps_sigignore & sigmask(SIGTTOU)) == 0 &&
(p->p_sigmask & sigmask(SIGTTOU)) == 0) {
if (pr->ps_pgrp->pg_jobc == 0) {
error = EIO;