Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern fix sigwaitinfo/sigtimedwait:
details: https://anonhg.NetBSD.org/src/rev/7b99496d28db
branches: trunk
changeset: 755034:7b99496d28db
user: drochner <drochner%NetBSD.org@localhost>
date: Thu May 20 17:10:42 2010 +0000
description:
fix sigwaitinfo/sigtimedwait:
-allow NULL "info" pointer
-return signal number
diffstat:
sys/kern/sys_sig.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r f3734f08a9c8 -r 7b99496d28db sys/kern/sys_sig.c
--- a/sys/kern/sys_sig.c Thu May 20 15:58:09 2010 +0000
+++ b/sys/kern/sys_sig.c Thu May 20 17:10:42 2010 +0000
@@ -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 @@
* 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;
}
Home |
Main Index |
Thread Index |
Old Index