[PATCH] [BZ #18433] Check file access/existence before forking.

navid Rahimi rahimi.nv@gmail.com
Fri Sep 11 20:33:00 GMT 2015


On Sat, Sep 12, 2015 at 12:28 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Sat, 12 Sep 2015, navid Rahimi wrote:
> You can't assume that pipe2 is supported unless __ASSUME_PIPE2 is defined.
> It might be an ENOSYS stub, or it might be unsupported at runtime because
> the kernel isn't recent enough.  In either case, an ENOSYS error from
> pipe2 must not result in such an error from posix_spawn.
> Joseph S. Myers
> joseph@codesourcery.com

Freebsd uses vfork (and its blocking nature for parent process) for
implementation of posix_spawn , but I have found cert article about
not using vfork

https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=1703954

pipes was more reliable in overall sight (in my opinion, because I
have seen so much people complaining about vfork) , but I can
implement another patch which fixes this bug with using vfork.
But I don't know should I use vfork ?



More information about the Libc-alpha mailing list