Re: [CYGWIN] ipc-daemon - Mailing list pgsql-hackers

From Jason Tishler
Subject Re: [CYGWIN] ipc-daemon
Date
Msg-id 20021104200525.GD1276@tishler.net
Whole thread Raw
In response to Re: [CYGWIN] ipc-daemon  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [CYGWIN] ipc-daemon
List pgsql-hackers
Tom,
Peter,

On Mon, Nov 04, 2002 at 02:43:01PM -0500, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > To me, this is a bug in PostgreSQL.
>
> I disagree: just because cygipc returns error codes chosen at random
> doesn't mean that we should neglect the clear meaning of an error
> code.  If a normal Unix system were to return EACCES here, the clear
> implication would be that there is an existing segment that we do not
> have permission to access.  I don't see how "cygipc isn't running" can
> reasonably be translated into "permission denied".
>
> [snip]
>
> > My first thought was ENOSYS (system call not implemented -- what BSD
> > kernels tend to return if you didn't compile them with SysV IPC
> > support), but that isn't a clearly superior choice either.
>
> If you can detect that cygipc is not running, then ENOSYS seems the
> best choice for reporting that.  (ENOSPC would be misleading too.)
>
> If it's impractical to fix cygipc then I'd grudgingly go along with
>
>         if (errno == EEXIST
> #ifndef __CYWGIN__                   /* cygipc is broken */
>             || errno == EACCES
> #endif
> #ifdef EIDRM
>             || errno == EIDRM
> #endif
>             )
>             return NULL;

Thanks for your feedback.  I will take this to the Cygwin list and see
what happens.  Unfortunately, the cygipc maintainer is "AWOL" right now
because of Ph.D. thesis commitments.  Hence, even if I can get the
Cygwin community to agree to this change, there may not be an official
cygipc release for a while.

Thanks,
Jason

--
GPG key available on key servers or http://www.tishler.net/jason/gpg.txt

Attachment

pgsql-hackers by date:

Previous
From: Tommi Maekitalo
Date:
Subject: missing const in PQescapeBytea/PQunescapeBytea in 7.3b3
Next
From: Bill Gribble
Date:
Subject: Re: [GENERAL] Database replication... - Mission Critical DBMS's --