This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #15701] Freopen with closed file descriptors.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Jeff Law <law at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 9 Oct 2013 21:49:12 +0200
- Subject: Re: [PATCH][BZ #15701] Freopen with closed file descriptors.
- Authentication-results: sourceware.org; auth=none
- References: <20131009192116 dot GA3800 at domone dot podge> <5255AF49 dot 8050003 at redhat dot com>
On Wed, Oct 09, 2013 at 01:32:25PM -0600, Jeff Law wrote:
> On 10/09/13 13:21, OndÅej BÃlka wrote:
> >Hi,
> >
> >This bug complains about undefined behavior when user closes file
> >descriptor. This is again patch or close case.
> >
> >We could check this by asking kernel if descriptor is valid.
> >
> >Comments?
> >
> >
> > * libio/freopen.c: Check if file descriptors are open.
> Couldn't this be done in a pre-load checker as well so that
> conforming code doesn't pay the checking penalty?
>
Could, when we make one.