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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-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

Browse pgsql-committers by date

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

Browse pgsql-hackers by date

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