delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/30/05:32:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20040330103057.32104.qmail@web60302.mail.yahoo.com>
Date: Tue, 30 Mar 2004 02:30:57 -0800 (PST)
From: Patrick Samson <p_samson AT yahoo DOT com>
Subject: Re: Postgres Backend doesn't catch the next command, after SIGUSR2
To: cygwin AT cygwin DOT com
In-Reply-To: <20040330094430.GG17229@cygbert.vinschen.de>
MIME-Version: 1.0
X-IsSubscribed: yes

--- Corinna Vinschen wrote:
> On Mar 30 01:03, Patrick Samson wrote:
> > >From msdn:
> > "All I/O operations that are canceled will
> complete
> > with the error ERROR_OPERATION_ABORTED. All
> completion
> > notifications for the I/O operations will occur
> > normally."
> 
> Urgh, I mised that.
> 
> > What's your feeling about:
> > if (!CancelIo ((HANDLE) socket))
> >   {...}
> > else
> >   {
> >    if (WSAGetOverlappedResult (socket, &ovr, &len,
> >  FALSE, flags) && len != 0)
> >     ret = (int) len;
> >    else WSASetLastError (WSAEINTR);
> 
> Did you try it?

No. Never ever build the dll yet.
I guess I should one day ;)

> Yesterday I changed Cygwin to use
> asynchronous I/O
> instead of overlapped I/O so it now can do without
> CancelIo.
> However, two people reported hangs which don't occur
> for me.  If
> if takes too long to track down, I guess I'll revert
> to overlapped
> I/O plus your patch.  But I would be more happy with
> a working
> async I/O solution.

Yesterday, I thought that mixing interrupt signals
and overlapped operations had some design flaw,
because of (from WS2 API):
"There is no way to cancel individual overlapped
operations pending on a given socket, however, the
closesocket() function can be called to close the
socket and eventually discontinue all pending
operations."
So non overlapped I/O would be better for my
personal case (only mime I agree). But I didn't even
think you could change to another behaviour.
Async I/O would probably saves my life, if the hangs
are solved.

Today, I think differently. If it's not possible
to cancel one *individual* op, I understand that
it's possible to cancel *all* ops in a clean way.
closesocket is one way, but not suitable in that
case. If cancelIO also is a clean way, then playing
with signal and overlapped I/O remains workable.



__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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