Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern In the timeout passed to sigtimedwait, NULL means a...



details:   https://anonhg.NetBSD.org/src/rev/de6657a601d2
branches:  trunk
changeset: 785316:de6657a601d2
user:      apb <apb%NetBSD.org@localhost>
date:      Fri Mar 08 08:48:38 2013 +0000

description:
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.

diffstat:

 sys/kern/sys_sig.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r bf330b73609c -r de6657a601d2 sys/kern/sys_sig.c
--- a/sys/kern/sys_sig.c        Fri Mar 08 08:36:37 2013 +0000
+++ b/sys/kern/sys_sig.c        Fri Mar 08 08:48:38 2013 +0000
@@ -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 @@
 
        /*
         * 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));



Home | Main Index | Thread Index | Old Index