Source-Changes-HG archive

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

[src/trunk]: src/lib/libc - clarify si_signo difference for waitid and wait6 ...



details:   https://anonhg.NetBSD.org/src/rev/809f1e96451a
branches:  trunk
changeset: 814735:809f1e96451a
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Apr 06 03:50:03 2016 +0000

description:
- clarify si_signo difference for waitid and wait6 as per POSIX.
- implement it.
- document WIFCONTINUED

diffstat:

 lib/libc/gen/waitid.c |   6 ++++--
 lib/libc/sys/wait.2   |  19 ++++++++++++++++---
 2 files changed, 20 insertions(+), 5 deletions(-)

diffs (74 lines):

diff -r be748b99aaf1 -r 809f1e96451a lib/libc/gen/waitid.c
--- a/lib/libc/gen/waitid.c     Wed Apr 06 03:38:31 2016 +0000
+++ b/lib/libc/gen/waitid.c     Wed Apr 06 03:50:03 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: waitid.c,v 1.2 2016/04/03 01:49:51 christos Exp $      */
+/*     $NetBSD: waitid.c,v 1.3 2016/04/06 03:50:03 christos Exp $      */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: waitid.c,v 1.2 2016/04/03 01:49:51 christos Exp $");
+__RCSID("$NetBSD: waitid.c,v 1.3 2016/04/06 03:50:03 christos Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -57,6 +57,8 @@
                        memset(info, 0, sizeof(*info));
                /*FALLTHROUGH*/
        default:
+               if (info != NULL && info->si_signo != 0)
+                       info->si_signo = SIGCHLD;
                return 0;
        }
 }
diff -r be748b99aaf1 -r 809f1e96451a lib/libc/sys/wait.2
--- a/lib/libc/sys/wait.2       Wed Apr 06 03:38:31 2016 +0000
+++ b/lib/libc/sys/wait.2       Wed Apr 06 03:50:03 2016 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: wait.2,v 1.29 2016/04/04 13:13:09 wiz Exp $
+.\"    $NetBSD: wait.2,v 1.30 2016/04/06 03:50:03 christos Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993, 1994
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)wait.2     8.2 (Berkeley) 4/19/94
 .\"
-.Dd April 2, 2016
+.Dd April 5, 2016
 .Dt WAIT 2
 .Os
 .Sh NAME
@@ -435,7 +435,12 @@
 .Fa si_signo
 field set to
 .Dv SIGCHLD
-and the
+for
+.Fn waitid
+as required by POSIX and to the delivering signal
+for
+.Fn wait6 .
+The
 .Fa si_pid
 field set to the process ID of the process reporting status.
 For the exited process, the
@@ -508,6 +513,14 @@
 option
 or if the child process is being traced (see
 .Xr ptrace 2 ) .
+.It Fn WIFCONTINUED status
+True if the process has not terminated, but has been continued via the
+delivery of the 
+.Dv SIGCONT
+signal.
+This macro can be true only if the wait call specified the
+.Dv WCONTINUED
+option.
 .El
 .Pp
 Depending on the values of those macros, the following macros



Home | Main Index | Thread Index | Old Index