- clarify si_signo difference for waitid and wait6 as per POSIX.
- implement it. - document WIFCONTINUED
This commit is contained in:
parent
3f5237a6a3
commit
a071bd3ff9
|
@ -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 @@ waitid(idtype_t idtype, id_t id, siginfo_t *info, int flags)
|
|||
memset(info, 0, sizeof(*info));
|
||||
/*FALLTHROUGH*/
|
||||
default:
|
||||
if (info != NULL && info->si_signo != 0)
|
||||
info->si_signo = SIGCHLD;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 @@ structure is returned with the
|
|||
.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 @@ This macro can be true only if the wait call specified the
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue