delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/11/07/03:49:21

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: Pete Forman <gsez020 AT kryten DOT bedford DOT waii DOT com>
MIME-Version: 1.0
Message-ID: <14855.49635.565990.716645@kryten.bedford.waii.com>
Date: Tue, 7 Nov 2000 08:48:35 +0000 (GMT)
To: Jason Tishler <Jason DOT Tishler AT dothill DOT com>
Cc: cygwin <cygwin AT sources DOT redhat DOT com>, pgsql-ports AT postgresql DOT org
Subject: Re: [PORTS] Re: ps and psql from PostgreSQL not working with cygwin-1.1.5-2
In-Reply-To: <20001106163707.A388@dothill.com>
References: <20001029205046 DOT A19137 AT redhat DOT com>
<kvd7gh6ngu DOT fsf AT vzell DOT de DOT oracle DOT com>
<20001031114831 DOT A27220 AT redhat DOT com>
<20001102122634 DOT A211 AT dothill DOT com>
<20001103160800 DOT A523 AT dothill DOT com>
<20001103163716 DOT A19118 AT redhat DOT com>
<20001103171504 DOT A238 AT dothill DOT com>
<3A035626 DOT BD9AA64B AT redhat DOT com>
<20001106163707 DOT A388 AT dothill DOT com>
X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid

Jason Tishler writes:
 > Sorry for not letting this thread die...
 > 
 > On Sat, Nov 04, 2000 at 01:19:50AM +0100, Corinna Vinschen wrote:
 > > That's the problem. I thought about changing the behaviour of
 > > connect two weeks ago. I'm not sure if it makes sense to change
 > > the error code translation table for exactly that reason: Who
 > > knows what that would break? Perhaps it's better to change only
 > > the connect call to return EINPROGRESS. On the other hand Winsock
 > > seem to have interchanged the meaning of WOULDBLOCK and
 > > INPROGRESS (by mistake?). Hmmm.
 > 
 > Can some one very knowledgeable with socket programming (hopefully
 > on many platforms) please help us out?  Should socket clients
 > (e.g., psql) be expected to test errno for EWOULDBLOCK (a.k.a
 > EAGAIN) when connect() returns -1?  Or, should cygwin map
 > EWOULDBLOCK to EINPROGRESS, at least for connect()?

According to POSIX, connect() should never set errno to EAGAIN or
EWOULDBLOCK.  (Those codes are appropriate for accept().)

  If the connection cannot be established immediately and O_NONBLOCK
  is set for the file descriptor for the socket, connect( ) shall fail
  and set errno to [EINPROGRESS], but the connection request shall not
  be aborted, and the connection shall be established asynchronously.
  Subsequent calls to connect( ) for the same socket, before the
  connection is established, shall fail and set errno to [EALREADY].

  When the connection has been established asynchronously, select( )
  and poll( ) shall indicate that the file descriptor for the socket
  is ready for writing.


  Upon successful completion, connect( ) shall return 0; otherwise, -1
  shall be returned and errno set to indicate the error.

If you want to research how sockets really behave on different
platforms have a look at ACE.  That is a thin wrapper that copes
with the idiosyncrasies of different OSs including Win32.

  http://www.cs.wustl.edu/~schmidt/ACE-overview.html

-- 
Pete Forman                 -./\.- Disclaimer: This post is originated
Western Geophysical           -./\.-  by myself and does not represent
pete DOT forman AT westgeo DOT com         -./\.-  the opinion of Baker Hughes or
http://www.crosswinds.net/~petef  -./\.-  its divisions.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019