This is the mail archive of the
mailing list for the GCC project.
Re: [patch, libgfortran] Fix PR59108 ACTION='READ' is using O_CREAT
- From: Jerry DeLisle <jvdelisle at charter dot net>
- To: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 15 Nov 2013 13:46:07 -0800
- Subject: Re: [patch, libgfortran] Fix PR59108 ACTION='READ' is using O_CREAT
- Authentication-results: sourceware.org; auth=none
- References: <528671E6 dot 7010802 at charter dot net> <CAO9iq9EE+ig4FkrhnRREuWAp2nkHOWAm41amyAcu8B3cfRim9g at mail dot gmail dot com>
On 11/15/2013 01:05 PM, Janne Blomqvist wrote:
> On Fri, Nov 15, 2013 at 9:11 PM, Jerry DeLisle <email@example.com> wrote:
>> The attached patch sets the create flag for the case where action is specified
>> as read only.
> I was looking at this yesterday, but didn't have time to finish
> everything then. So I made a similar patch, which also takes into
> account the case where ACTION= is not specified and opening the file
> with read-write fails and we fall back to trying to open read-only.
>> I have confirmed that the PR test case now only produces:
>> open("wombat", O_RDONLY) = 3
>> open("numbat", O_RDONLY) = 4
>> open("dingbat", O_RDONLY) = 5
> FWIW, I see you haven't updated recently; since a week ago you should
> also see O_CLOEXEC (unless you have some old system).
I also have the O_CLOEXEC, I just did not paste it in my message.
> My alternate patch attached. Regtested on x86_64-unknown-linux-gnu, Ok
> for trunk?
OK. Simple enough.