Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Fri, 3 Nov 2000 16:08:00 -0500 From: Jason Tishler To: cygwin AT sources DOT redhat DOT com Cc: pgsql-ports AT postgresql DOT org Subject: Re: [PORTS] Re: ps and psql from PostgreSQL not working with cygwin-1.1.5-2 Message-ID: <20001103160800.A523@dothill.com> References: <20001029205046 DOT A19137 AT redhat DOT com> <20001031114831 DOT A27220 AT redhat DOT com> <20001102122634 DOT A211 AT dothill DOT com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="D6VC0Tnz8RkTVoGm" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001102122634.A211@dothill.com>; from Jason.Tishler@dothill.com on Thu, Nov 02, 2000 at 12:26:34PM -0500 Organization: Dot Hill Systems Corp. --D6VC0Tnz8RkTVoGm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 02, 2000 at 12:26:34PM -0500, Jason Tishler wrote: > On Tue, Oct 31, 2000 at 11:48:31AM -0500, Christopher Faylor wrote: > > I can't duplicate the ps problem and I don't use psql.exe so, unless someone > > can debug this, or provide more details, this will be a problem that is in > > 1.1.5. > > Either of the two attached patches will solve the 1.1.5 psql.exe problem. > I think that the first one is more correct and the second one safer (i.e., > less likely to break other code). After more research, I realize that both of the above patches are wrong. Sorry for the gyrations but I went into frenzy mode due to the impending 1.1.5 release (which if I remember correctly was suppose to be yesterday)... I was also thrown off by Cygwin's strerror(EAGAIN) returning "No more processes" instead of "Resource temporarily unavailable" as on other UNIXes (at least Solaris and RedHat 6.2 Linux). Anyway, I now think that PostgreSQL's psql should be changed to deal with the possibility of errno equal to EAGAIN when connect() returns -1. See attached patch for details. Does anyone else concur? Thanks, Jason P.S. From reading the MSDN, it appears that Win32 psql should be checking for WSAEWOULDBLOCK too... -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corporation Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason DOT Tishler AT dothill DOT com Hazlet, NJ 07730 USA WWW: http://www.dothill.com --D6VC0Tnz8RkTVoGm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Cygwin-1.1.5-PosgreSQL-7.0.2.patch" --- postgresql-7.0.2.orig/src/interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 +++ postgresql-7.0.2/src/interfaces/libpq/fe-connect.c Fri Nov 3 15:26:08 2000 @@ -868,7 +868,7 @@ connectDBStart(PGconn *conn) if (connect(conn->sock, &conn->raddr.sa, conn->raddr_len) < 0) { #ifndef WIN32 - if (errno == EINPROGRESS || errno == 0) + if (errno == EINPROGRESS || errno == EAGAIN || errno == 0) #else if (WSAGetLastError() == WSAEINPROGRESS) #endif --D6VC0Tnz8RkTVoGm Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com --D6VC0Tnz8RkTVoGm--