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: Tue, 15 May 2001 10:10:36 -0400 From: Jason Tishler To: cygwin AT cygwin DOT com Cc: Pgsql-Cygwin Subject: Re: SIGTERM does not stop backend postgres processes immediately Message-ID: <20010515101036.D321@dothill.com> Mail-Followup-To: cygwin AT cygwin DOT com, Pgsql-Cygwin Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010515112054.G31266@cygbert.vinschen.de> User-Agent: Mutt/1.3.18i Organization: Dot Hill Systems Corp. Corrina, On Tue, May 15, 2001 at 11:20:54AM +0200, Corinna Vinschen wrote: > On Fri, May 11, 2001 at 09:09:28AM +1000, Robert Collins wrote: > > Blueskying a concept here: what about cygwin opening all sockets in > > non-blocking mode, and if the app thinks that it is a blocking call wait > > on the socket && on a signal event? > > > > Obviously not trivial to get working right, but > > a) would it work on 95? > > b) thoughts? > > b) I have just applied a patch to Cygwin which uses overlapped IO > together with the Winsock2 calls WSARecv, WSARecvFrom, WSASend > and WSASendTo if available. The new mechanism is interruptable > by signals. If Winsock2 is not available the new implementation > just falls back to using the non-inerruptable Winsock1 calls. > > I would like to ask people to test it especially in conjunction > with PostgreSQL, which I haven't set up. I just tried my Cygwin PostgreSQL 7.1.1 distribution against the latest Cygwin CVS and the above mentioned patch solves the postmaster shutdown problem. Now Cygwin PostgreSQL behaves identical to UNIX PostgreSQL with regard to shutdown: 1. pg_ctl stop (i.e., kill -s SIGTERM) causes postmaster to wait for all clients to disconnect before shutting down. 2. pg_ctl -m fast stop (i.e., kill -s SIGINT) causes postmaster to shutdown immediately (but cleanly) without waiting for all clients to disconnect. Your patch fixed case 2 above and I believe this is the last piece needed by Fred Yankowski to complete his PostgreSQL NT service patch. Thank you very much for this patch -- it is really appreciated. Jason -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corp. 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 -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple