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>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
> =A0posix_spawn(): Do not fail when trying to close an fd that is not open=
.
>
> =A0As noted in Austin Group issue #370 (an interpretation has been issued=
),
> =A0failing posix_spawn() because an fd specified with
> =A0posix_spawn_file_actions_addclose() is not open is unnecessarily harsh=
, and
> =A0there are existing implementations that do not fail posix_spawn() for =
this
> =A0reason.

...

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 th=
e
          error occurs after the calling process successfully returns, the
          child process exits with exit status 127). An open file action ma=
y,
          by itself, result in any of the errors described by close() or
          dup2(), in addition to those described by open().



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