summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-09-28 10:00:19 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-09-28 10:00:19 +0000
commit2848dd98e4468193936830db82b18147df0d02dc (patch)
tree365b3363e6b0be028cfb76ac824023003d010ba5 /sys
parent159b482be31212eded149199fd09659e4c8ba3e6 (diff)
Fix timeout behaviour bug introduced in 1.241.
If the timespec is zero-valued sys___thrsigdivert() should just do the check for pending signals and return immediatly. OK kettenis@
Diffstat (limited to 'sys')
-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 f23ffe9c1d6..24d87cdb50f 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.282 2021/07/14 22:09:24 bluhm Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.283 2021/09/28 10:00:18 claudio Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -1799,8 +1799,8 @@ sys___thrsigdivert(struct proc *p, void *v, register_t *retval)
/* per-POSIX, delay this error until after the above */
if (timeinvalid)
error = EINVAL;
-
- if (SCARG(uap, timeout) != NULL && nsecs == INFSLP)
+ /* per-POSIX, return immediatly if timeout is zero-valued */
+ if (nsecs == 0)
error = EAGAIN;
if (error != 0)