diff options
author | 2019-05-13 19:21:31 +0000 | |
---|---|---|
committer | 2019-05-13 19:21:31 +0000 | |
commit | 788422d65be41111bc05f25ec194535e3ae7eb6c (patch) | |
tree | 2a0e4cfda82fe14e76fd02a67a366b04f0eddc90 /sys/kern/tty.c | |
parent | Do not check for IFF_RUNNING inside bstp_initialization(). (diff) | |
download | wireguard-openbsd-788422d65be41111bc05f25ec194535e3ae7eb6c.tar.xz wireguard-openbsd-788422d65be41111bc05f25ec194535e3ae7eb6c.zip |
When killing a process, the signal is handled by any thread that
does not block the signal. If all threads block the signal, we
delivered it to the main thread. This does not conform to POSIX.
If any thread unblocks the signal, it should be delivered immediately
to this thread.
Mark such signals pending at the process instead of a single thread.
Then any thread can handle it later.
OK kettenis@ guenther@
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index c57e8ca9a4f..fd54b0fca75 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.143 2018/09/06 11:50:54 jsg Exp $ */ +/* $OpenBSD: tty.c,v 1.144 2019/05/13 19:21:31 bluhm Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -1676,11 +1676,11 @@ ttycheckoutq(struct tty *tp, int wait) hiwat = tp->t_hiwat; s = spltty(); - oldsig = wait ? curproc->p_siglist : 0; + oldsig = wait ? SIGPENDING(curproc) : 0; if (tp->t_outq.c_cc > hiwat + TTHIWATMINSPACE) while (tp->t_outq.c_cc > hiwat) { ttstart(tp); - if (wait == 0 || curproc->p_siglist != oldsig) { + if (wait == 0 || SIGPENDING(curproc) != oldsig) { splx(s); return (0); } |