This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2.1 1/2][BZ #16274] Fix shm_open.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 3 Dec 2013 16:27:51 +0100
- Subject: Re: [PATCH v2.1 1/2][BZ #16274] Fix shm_open.
- Authentication-results: sourceware.org; auth=none
- References: <20131129004016 dot GA19990 at domone dot podge> <5297F6B6 dot 5010609 at redhat dot com> <20131129180250 dot GA24922 at domone dot podge> <5298EF8F dot 6020700 at redhat dot com> <20131202230453 dot GA6175 at domone dot podge> <529D1AD1 dot 7080500 at redhat dot com> <20131203112032 dot GB11582 at domone dot podge> <529DF41B dot 2000500 at redhat dot com>
On Tue, Dec 03, 2013 at 10:09:15AM -0500, Carlos O'Donell wrote:
> On 12/03/2013 06:20 AM, OndÅej BÃlka wrote:
> >> Shouldn't this be s/0/-1/g? It's a real failure?
> >
> > It is failure as we passed EXIT_FAILURE to status, arguments to error are:
> >
> > error (int status, int errnum, const char *format, ...)
> >
>
> Sorry, I forgot the order of the arguments to this function.
>
> Let me rephrase my question more precisely.
>
> Should we instead use:
>
> error (EXIT_FAILURE, errno, "failed to create shared memory object: shm_open");
>
> Such that we print:
>
> "failed to create shared memory object: shm_open: `strerror(errno)'"
>
Possible but as existing checks pass 0 we should also convert them as
separate patch.