fix sigwaitinfo/sigtimedwait:
-allow NULL "info" pointer -return signal number
This commit is contained in:
parent
8cfbddcc72
commit
8239dc73b5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sys_sig.c,v 1.26 2010/01/19 22:28:31 pooka Exp $ */
|
||||
/* $NetBSD: sys_sig.c,v 1.27 2010/05/20 17:10:42 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.26 2010/01/19 22:28:31 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.27 2010/05/20 17:10:42 drochner Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -742,9 +742,11 @@ out:
|
||||
* Copy only the used part of siginfo, the padding part is
|
||||
* left unchanged (userland is not supposed to touch it anyway).
|
||||
*/
|
||||
if (error == 0) {
|
||||
if (error == 0 && SCARG(uap, info)) {
|
||||
error = (*storeinf)(&ksi.ksi_info, SCARG(uap, info),
|
||||
sizeof(ksi.ksi_info));
|
||||
}
|
||||
if (error == 0)
|
||||
*retval = ksi.ksi_info._signo;
|
||||
return error;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user