summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-04-15 04:52:39 +0000
committerguenther <guenther@openbsd.org>2011-04-15 04:52:39 +0000
commit4dec2d3cb6dfb165c5fbac58485496efe3408afc (patch)
treeb6a1f9c45071d4c3e150d83b7188558aa575f769 /sys/kern/tty.c
parentNo need to make depend kernels (diff)
downloadwireguard-openbsd-4dec2d3cb6dfb165c5fbac58485496efe3408afc.tar.xz
wireguard-openbsd-4dec2d3cb6dfb165c5fbac58485496efe3408afc.zip
Correct the sharing of the signal handling state: stuff that should
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_oldmask, SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread until our locking around coredumping is better. Oh, and remove the old SunOS-compat ps_usertramp member. "I like the sound of this" tedu@
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 5b3769ae34a..fbb6921eecc 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.89 2011/04/03 14:56:28 guenther Exp $ */
+/* $OpenBSD: tty.c,v 1.90 2011/04/15 04:52:40 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;