On Mon, May 30, 2011 at 2:41 PM, Jilles Tjoelker <jil...@freebsd.org> wrote:
> Author: jilles
> Date: Mon May 30 21:41:06 2011
> New Revision: 222511
> URL: http://svn.freebsd.org/changeset/base/222511
>
> Log:
>  posix_spawn(): Do not fail when trying to close an fd that is not open.
>
>  As noted in Austin Group issue #370 (an interpretation has been issued),
>  failing posix_spawn() because an fd specified with
>  posix_spawn_file_actions_addclose() is not open is unnecessarily harsh, and
>  there are existing implementations that do not fail posix_spawn() for this
>  reason.

...

The manpage should probably be updated:

     5.   If the file_actions argument is not NULL, and specifies any close,
          dup2, or open actions to be performed, and if posix_spawn() or
          posix_spawnp() fails for any of the reasons that would cause
          close(), dup2(), or open() to fail, an error value is returned as
          described by close(), dup2(), and open(), respectively (or, if the
          error occurs after the calling process successfully returns, the
          child process exits with exit status 127). An open file action may,
          by itself, result in any of the errors described by close() or
          dup2(), in addition to those described by open().
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to