summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_socket.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2019-05-13 19:21:32 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2019-05-13 19:21:32 +0000
commit2f9098949367fc1d23961282191f3e641f89e957 (patch)
tree046309760dc9f4dc09397c1eed5d2088fe5fa47c /sys/nfs/nfs_socket.c
parent9b65c2550d8f19eb24c6ddec4efd6a8c3c4c0d5d (diff)
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/nfs/nfs_socket.c')
-rw-r--r--sys/nfs/nfs_socket.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index bbde6883301..7d5a76a5a32 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.132 2018/11/09 14:14:32 claudio Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.133 2019/05/13 19:21:31 bluhm Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -1225,9 +1225,8 @@ nfs_sigintr(struct nfsmount *nmp, struct nfsreq *rep, struct proc *p)
return (EINTR);
if (!(nmp->nm_flag & NFSMNT_INT))
return (0);
- if (p && p->p_siglist &&
- (((p->p_siglist & ~p->p_sigmask) &
- ~p->p_p->ps_sigacts->ps_sigignore) & NFSINT_SIGMASK))
+ if (p && (SIGPENDING(p) & ~p->p_p->ps_sigacts->ps_sigignore &
+ NFSINT_SIGMASK))
return (EINTR);
return (0);
}