From owner-freebsd-standards@FreeBSD.ORG Fri Aug 3 09:00:26 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 991861065674 for ; Fri, 3 Aug 2012 09:00:26 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 840BB8FC15 for ; Fri, 3 Aug 2012 09:00:26 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7390QGd020851 for ; Fri, 3 Aug 2012 09:00:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7390QkX020850; Fri, 3 Aug 2012 09:00:26 GMT (envelope-from gnats) Date: Fri, 3 Aug 2012 09:00:26 GMT Message-Id: <201208030900.q7390QkX020850@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Sergey Kandaurov Cc: Subject: Re: standards/170346: Changes to support waitid() and related stuff X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sergey Kandaurov List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 09:00:26 -0000 The following reply was made to PR standards/170346; it has been noted by GNATS. From: Sergey Kandaurov To: bug-followup@FreeBSD.org, jau@iki.fi Cc: Subject: Re: standards/170346: Changes to support waitid() and related stuff Date: Fri, 3 Aug 2012 12:52:39 +0400 Hi. Shouldn't the idtype_t definition be cut from sys/types.h and instead moved into sys/wait.h itself? POSIX specifies for waitid() that you only need to include sys/wait.h and doesn't mention sys/types.h. It's also probably makes sense to wrap new syscall with __POSIX_VISIBLE Something like this: Index: sys/sys/wait.h =================================================================== --- sys/sys/wait.h (revision 237379) +++ sys/sys/wait.h (working copy) @@ -93,8 +93,18 @@ #define WAIT_MYPGRP 0 /* any process in my process group */ #endif /* __BSD_VISIBLE */ +#if __POSIX_VISIBLE >= 200809 +/* needs for waitid() */ +typedef enum { + P_ALL, + P_PGID, + P_PID +/* other stuff goes here */ +} idtype_t; +#endif + #ifndef _KERNEL #include +#include __BEGIN_DECLS pid_t wait(int *); @@ -104,6 +114,9 @@ pid_t wait3(int *, int, struct rusage *); pid_t wait4(pid_t, int *, int, struct rusage *); #endif +#if __POSIX_VISIBLE >= 200809 +int waitid(idtype_t, id_t, siginfo_t *, int); +#endif __END_DECLS #endif /* !_KERNEL */ The remain part of sys/wait.h patch intentionally omitted for clarity. -- wbr, pluknet