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

Re: Re: pgsql: add EPERM to the list of return codes to expect from opening

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Greg Stark <stark(at)postgresql(dot)org>, "<pgsql-hackers(at)postgresql(dot)org>" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: pgsql: add EPERM to the list of return codes to expect from opening
Date: 2010-03-01 13:37:00
Message-ID: 9837222c1003010537r79589e25kcb7edb16cabb66e4@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
You might want to look at _dosmaperror() in src/port/win32error.c - it
contains the different win32 error ccodes that we match to EACCESS. I
don't see us mapping *anything* to EPERM.

Actually, I think that may be your problem - you are testing against
EPERM instead of EACCESS. On my linux manpage, EPERM isn't even a
valid return code from open().

//Magnus

2010/3/1 Greg Stark <gsstark(at)mit(dot)edu>:
> This isn't working. The Windows ports are all saying "permission
> denied" but apparently that's not because errno is set to EPERM.
> Anyone know how to detect "permission denied" errors from open() on
> windows?
>
> On Mon, Mar 1, 2010 at 12:04 AM, Greg Stark <stark(at)postgresql(dot)org> wrote:
>> Log Message:
>> -----------
>> add EPERM to the list of return codes to expect from opening directories based on Vista results
>>
>> Modified Files:
>> --------------
>>    pgsql/src/port:
>>        copydir.c (r1.34 -> r1.35)
>>        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/port/copydir.c?r1=1.34&r2=1.35)
>>
>> --
>> Sent via pgsql-committers mailing list (pgsql-committers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-committers
>>
>
>
>
> --
> greg
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>



-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2010-03-01 13:53:37
Subject: Re: remove contrib/xml2
Previous:From: Greg StarkDate: 2010-03-01 13:26:08
Subject: Re: pgsql: add EPERM to the list of return codes to expect from opening

pgsql-committers by date

Next:From: Tom LaneDate: 2010-03-01 14:54:00
Subject: pgsql: Buildfarm still unhappy, so I'll bet it's EACCES not EPERM.
Previous:From: Greg StarkDate: 2010-03-01 13:26:08
Subject: Re: pgsql: add EPERM to the list of return codes to expect from opening

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