Skip site navigation (1) Skip section navigation (2)

Re: Bad bug in fopen() wrapper code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: Bad bug in fopen() wrapper code
Date: 2006-09-24 17:16:08
Message-ID: 8015.1159118168@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> That is part of the original open() code that Claudio did back for 8.0,
> so it has definitly been working since then.

Hm, maybe best not to touch it, but still...

> I haven't really read into
> the code, though... But a qiuck look doesn't show me any place wher eit
> does ignore O_EXCL - which combination would that be?

What's bugging me is that 0 and O_EXCL give the same answer, and
O_TRUNC and O_TRUNC | O_EXCL give the same answer, but O_CREAT and
O_CREAT | O_EXCL give different answers, as do O_CREAT | O_TRUNC
and O_CREAT | O_TRUNC | O_EXCL.  I'm also pretty suspicious of
both O_CREAT | O_EXCL and O_CREAT | O_TRUNC | O_EXCL giving the
same answer.  However, I have no idea what the semantics are of
the symbols the function is mapping into, so maybe it's OK.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-09-24 17:21:04
Subject: Re: Bad bug in fopen() wrapper code
Previous:From: Tom LaneDate: 2006-09-24 17:11:03
Subject: Re: Updates to pg_regress.c

pgsql-patches by date

Next:From: Tom LaneDate: 2006-09-24 17:21:04
Subject: Re: Bad bug in fopen() wrapper code
Previous:From: Tom LaneDate: 2006-09-24 17:11:03
Subject: Re: Updates to pg_regress.c

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group