This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [BZ #18433] Check file access/existence before forking.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: navid Rahimi <rahimi dot nv at gmail dot com>
- Cc: Carlos O'Donell <carlos at redhat dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, Phil Blundell <pb at pbcl dot net>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Fri, 18 Sep 2015 15:41:06 +0000
- Subject: Re: [PATCH] [BZ #18433] Check file access/existence before forking.
- Authentication-results: sourceware.org; auth=none
- References: <55F19819 dot 3010601 at gmail dot com> <55F19B66 dot 9050001 at arm dot com> <55F19C50 dot 3010502 at gmail dot com> <1441909606 dot 2948 dot 25 dot camel at pbcl dot net> <CAOUBrm2Kjbk3q+QJACYG24=p1dz60JXimxYG3oRRz2ehpocwkQ at mail dot gmail dot com> <55F299F4 dot 6030907 at arm dot com> <55FC235E dot 6030608 at redhat dot com> <CAOUBrm2Q5FBoHReAYaFtrBGXsCPZpLyCnY=ni70cxe0hFdckEQ at mail dot gmail dot com>
There are various places where you're missing the space before the '(' of
a function call.
POSIX specifies that no library function sets errno to 0.
Typically when using a fallback from __ASSUME_PIPE2 the first fallback
would be to try calling __pipe2 even if !__ASSUME_PIPE2 - and if it fails
with an errno setting other than ENOSYS, then treat that as an error from
which you don't try to fall back, but if it fails with ENOSYS, fall back
to __pipe. In addition, such code in the !__ASSUME_PIPE2 case uses the
variable __have_pipe2 (0 if pipe2 availability unknown, 1 if it's been
tried and didn't fail with ENOSYS, -1 if it's been tried and did fail with
ENOSYS. See various existing examples.
--
Joseph S. Myers
joseph@codesourcery.com