Jim Meyering <[EMAIL PROTECTED]> writes:

> Rather than investigate,
> I'm taking this opportunity to upgrade to the use of waitpid.

Thanks; I'd been meaning to do that since the Austin Group's March 16
meeting added a warning under 'wait' saying (basically) that you
shouldn't ever use it, or anything like it.  Here's the text they're
adding to POSIX:

   Calls to wait() will collect information about any child process.
   This may result in interactions with other interfaces that may be waiting
   for their own children (such as by use of system()). For this and other
   reasons it is recommended that portable applications not use wait(),
   but instead use waitpid(). For these same reasons, the use of waitpid()
   with a <pid> argument of -1 and the use of  waitid() with the idtype
   argument set to P_ALL, are also not recommended for portable applications.

The only remaining use of 'wait' in coreutils is in lib/rmdir.c, which
is OK since that code is 100% obsolete anyway.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to