PR/40594: Antti Kantee: Don't call issignal() here to determine what errno
to set for the interrupted syscall, because issignal() will consume the signal and it will not be delivered to the process afterwards. Instead call sigispending() (which now returns the first pending signal) and does not consume the signal.
This commit is contained in:
parent
0330b42b89
commit
eba2a3cf3e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_sleepq.c,v 1.41 2011/07/27 14:35:34 uebayasi Exp $ */
|
||||
/* $NetBSD: kern_sleepq.c,v 1.42 2011/08/31 16:09:55 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.41 2011/07/27 14:35:34 uebayasi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_sleepq.c,v 1.42 2011/08/31 16:09:55 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -284,7 +284,7 @@ sleepq_block(int timo, bool catch)
|
||||
* not recurse again.
|
||||
*/
|
||||
mutex_enter(p->p_lock);
|
||||
if ((sig = issignal(l)) != 0)
|
||||
if ((sig = sigispending(l, 0)) != 0)
|
||||
error = sleepq_sigtoerror(l, sig);
|
||||
mutex_exit(p->p_lock);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user