Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2011 14:51:56 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Jilles Tjoelker <jilles@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r222511 - head/lib/libc/gen
Message-ID:  <BANLkTi=Y-r1apr-xWrDsn0UMD4877ibLcA@mail.gmail.com>
In-Reply-To: <201105302141.p4ULf6HB094332@svn.freebsd.org>
References:  <201105302141.p4ULf6HB094332@svn.freebsd.org>

index | next in thread | previous in thread | raw e-mail

On Mon, May 30, 2011 at 2:41 PM, Jilles Tjoelker <jilles@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().


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTi=Y-r1apr-xWrDsn0UMD4877ibLcA>