summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-07-29 09:49:50 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-07-29 09:49:50 +0000
commit379ad73e19aa3033cfe19771c6dabd3861d271f8 (patch)
treeacefcb86374e467d21de346ee7b3883bafb87272 /sys/kern/kern_sig.c
parent40a5bca229d901228253bb22b53190f40c0d65bd (diff)
Replace per thread P_CONTINUED with per process PS_CONTINUED flag
dowait6() can only look at per process state so switch this over. Right now SIGCONT handling in ptsignal is recursive and not quite right but this is a step in the right direction. It fixes dowait6() handling for multithreaded processes where the main thread exited. OK mpi@
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index a0d73ccaa95..dd54c552edc 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.334 2024/07/24 15:31:08 claudio Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.335 2024/07/29 09:49:49 claudio Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -1097,7 +1097,7 @@ ptsignal(struct proc *p, int signum, enum signal_type type)
* an event, then it goes back to run state.
* Otherwise, process goes back to sleep state.
*/
- atomic_setbits_int(&p->p_flag, P_CONTINUED);
+ atomic_setbits_int(&pr->ps_flags, PS_CONTINUED);
atomic_clearbits_int(&p->p_flag, P_SUSPSIG);
wakeparent = 1;
if (action == SIG_DFL)
@@ -1260,7 +1260,7 @@ out:
}
if (prop & SA_STOP) {
atomic_clearbits_int(siglist, CONTSIGMASK);
- atomic_clearbits_int(&p->p_flag, P_CONTINUED);
+ atomic_clearbits_int(&pr->ps_flags, PS_CONTINUED);
}
SCHED_UNLOCK();