Module Name: src Committed By: apb Date: Fri Mar 8 08:48:38 UTC 2013
Modified Files: src/sys/kern: sys_sig.c Log Message: In the timeout passed to sigtimedwait, NULL means an infinite timeout, and {.tv_sec = 0, .tv_nsec=0} means do not block at all. Add a comment saying so. The code incorrectly treats them both as an infinite timeout, and that is not fixed by this commit. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/kern/sys_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/sys_sig.c diff -u src/sys/kern/sys_sig.c:1.39 src/sys/kern/sys_sig.c:1.40 --- src/sys/kern/sys_sig.c:1.39 Tue Jan 22 01:45:59 2013 +++ src/sys/kern/sys_sig.c Fri Mar 8 08:48:38 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_sig.c,v 1.39 2013/01/22 01:45:59 christos Exp $ */ +/* $NetBSD: sys_sig.c,v 1.40 2013/03/08 08:48:38 apb 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.39 2013/01/22 01:45:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.40 2013/03/08 08:48:38 apb Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -715,6 +715,9 @@ sigtimedwait1(struct lwp *l, const struc /* * Calculate timeout, if it was specified. + * + * NULL pointer means an infinite timeout. + * {.tv_sec = 0, .tv_nsec = 0} means do not block. */ if (SCARG(uap, timeout)) { error = (*fetchts)(SCARG(uap, timeout), &ts, sizeof(ts));