Date: Fri, 3 Aug 2012 09:00:26 GMT From: Sergey Kandaurov <pluknet@gmail.com> To: freebsd-standards@FreeBSD.org Subject: Re: standards/170346: Changes to support waitid() and related stuff Message-ID: <201208030900.q7390QkX020850@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR standards/170346; it has been noted by GNATS. From: Sergey Kandaurov <pluknet@gmail.com> 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 <sys/types.h> +#include <sys/signal.h> __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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208030900.q7390QkX020850>