From 89c9af902e342d2d6df67b4a4e6cfda04adead14 Mon Sep 17 00:00:00 2001 From: Philip Guenthe Date: Thu, 29 Jan 2009 22:18:07 +0000 Subject: Remove KASSERT() that could trigger when an rthread in sigwait() got multiple signals before tsleep() could wakeup. Also, POSIX says that sigwait() should never return EINTR, so map that to ERESTART. ok kurt@, tedu@ fixes the panic encountered by ariane@ with kaffe --- sys/kern/kern_sig.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 63d01e252c1..ed52c212eca 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.101 2008/12/16 07:57:28 guenther Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.102 2009/01/29 22:18:06 guenther Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -1532,12 +1532,11 @@ sys_thrsigdivert(struct proc *p, void *v, register_t *retval) /* interrupted */ KASSERT(error != 0); atomic_clearbits_int(&p->p_sigdivert, ~0); - if (error == ERESTART) - error = EINTR; + if (error == EINTR) + error = ERESTART; return (error); } - KASSERT(error == 0); KASSERT(p->p_sigwait != 0); *retval = p->p_sigwait; return (0); -- cgit v1.2.3