diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2021-05-10 18:01:25 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2021-05-10 18:01:25 +0000 |
commit | 405b3d4402434a7427ba0135b9c95946ca569c46 (patch) | |
tree | d676eef9d381a9baaeb79c4da2396c42cec5f585 /sys/kern/sched_bsd.c | |
parent | ecd435a29eda5ed9bfcd92a16445e2db601bc0c4 (diff) |
Revert previous, it introduced a regression with breakpoints in gdb.
Diffstat (limited to 'sys/kern/sched_bsd.c')
-rw-r--r-- | sys/kern/sched_bsd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c index 015d3b5fa91..f0bb6ef7228 100644 --- a/sys/kern/sched_bsd.c +++ b/sys/kern/sched_bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sched_bsd.c,v 1.66 2021/05/06 09:33:22 mpi Exp $ */ +/* $OpenBSD: sched_bsd.c,v 1.67 2021/05/10 18:01:24 mpi Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /*- @@ -456,6 +456,12 @@ setrunnable(struct proc *p) default: panic("setrunnable"); case SSTOP: + /* + * If we're being traced (possibly because someone attached us + * while we were stopped), check for a signal from the debugger. + */ + if ((pr->ps_flags & PS_TRACED) != 0 && pr->ps_xsig != 0) + atomic_setbits_int(&p->p_siglist, sigmask(pr->ps_xsig)); prio = p->p_usrpri; unsleep(p); break; |