From: Greg Stark on
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(a)postgresql.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(a)postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers
>



--
greg

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Magnus Hagander on
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(a)mit.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(a)postgresql.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(a)postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-committers
>>
>
>
>
> --
> greg
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.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/

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Tom Lane on
Magnus Hagander <magnus(a)hagander.net> writes:
> 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().

Yeah, I had just come to the same conclusion upon seeing the buildfarm
still pink this morning. On my old HPUX box these codes are defined as

/usr/include/sys/errno.h:#define EPERM 1 /* Not super-user */
/usr/include/sys/errno.h:#define EACCES 13 /* Permission denied */

so EPERM seems like the wrong mapping for such an error anyway.

BTW, in case anyone with admin privileges is paying attention, the
buildfarm (a) is about two hours off on its system clock again,
and (b) hasn't sent out a daily status-change summary email since
Friday.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Greg Stark on
So fwiw Narwhal says EACCESS is working.

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Robert Haas on
On Mon, Mar 1, 2010 at 10:01 AM, Tom Lane <tgl(a)sss.pgh.pa.us> wrote:
> BTW, in case anyone with admin privileges is paying attention, the
> buildfarm (a) is about two hours off on its system clock again,
> and (b) hasn't sent out a daily status-change summary email since
> Friday.

Eh? The buildfarm sends out a daily status-change summary email? To where?

....Robert

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers