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

Started by Bruce Momjianabout 16 years ago10 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

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)

#2Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#1)
Re: pgsql: add EPERM to the list of return codes to expect from opening

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@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&amp;r2=1.35)

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

--
greg

#3Magnus Hagander
magnus@hagander.net
In reply to: Bruce Momjian (#2)
Re: Re: pgsql: add EPERM to the list of return codes to expect from opening

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@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@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&amp;r2=1.35)

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

--
greg

--
Sent via pgsql-hackers mailing list (pgsql-hackers@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/

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#3)
Re: Re: pgsql: add EPERM to the list of return codes to expect from opening

Magnus Hagander <magnus@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

#5Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#4)
Re: Re: pgsql: add EPERM to the list of return codes to expect from opening

So fwiw Narwhal says EACCESS is working.

#6Robert Haas
robertmhaas@gmail.com
In reply to: Tom Lane (#4)
Re: Re: pgsql: add EPERM to the list of return codes to expect from opening

On Mon, Mar 1, 2010 at 10:01 AM, Tom Lane <tgl@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

#7Andrew Dunstan
andrew@dunslane.net
In reply to: Robert Haas (#6)
Re: Re: pgsql: add EPERM to the list of return codes to expect from opening

Robert Haas wrote:

On Mon, Mar 1, 2010 at 10:01 AM, Tom Lane <tgl@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?

To subscribers of the relevant mailing lists. See
<http://pgfoundry.org/mail/?group_id=1000040&gt;

cheers

andrew

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#6)
Re: Re: pgsql: add EPERM to the list of return codes to expect from opening

Robert Haas <robertmhaas@gmail.com> writes:

On Mon, Mar 1, 2010 at 10:01 AM, Tom Lane <tgl@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?

See
http://pgfoundry.org/mail/?group_id=1000040

I'm subscribed to pgbuildfarm-status-green ... and the archives for
it match my local log, which says there hasn't been a message since
Friday. That's definitely not for lack of changes. Now that I look
at the archives, it looks like all the status lists stopped getting
mail around that time.

regards, tom lane

#9Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#8)
Re: Re: pgsql: add EPERM to the list of return codes to expect from opening

Tom Lane wrote:

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

See
http://pgfoundry.org/mail/?group_id=1000040

I'm subscribed to pgbuildfarm-status-green ... and the archives for
it match my local log, which says there hasn't been a message since
Friday. That's definitely not for lack of changes. Now that I look
at the archives, it looks like all the status lists stopped getting
mail around that time.

There is a DNS failure on the server causing a huge backlog of status
messages. I have sent a message to the admins list about it. (I can see
the list of errors on the machine by running mailq, but I can't do
anything about it.)

cheers

andrew

#10Andrew Dunstan
andrew@dunslane.net
In reply to: Bruce Momjian (#5)
Re: Re: pgsql: add EPERM to the list of return codes to expect from opening

Greg Stark wrote:

So fwiw Narwhal says EACCESS is working.

dawn_bat is also working. Both of these build using Mingw/gcc, not MSVC.

cheers

andrew