delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/24/14:23:16

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: <200302241923.h1OJN2N19746@head-cfa.cfa.harvard.edu>
To: "Elfyn McBratney" <elfyn-cygwin AT exposure DOT org DOT uk>, cygwin AT cygwin DOT com
cc: eric AT head-cfa DOT cfa DOT harvard DOT edu
Subject: Re: connect() not interrupted by sigalrm?
In-Reply-To: Your message of "Mon, 24 Feb 2003 19:05:30 GMT."
<035601c2dc37$dd623cb0$c67486d9 AT webdev>
Date: Mon, 24 Feb 2003 14:23:02 -0500
From: Eric Mandel <eric AT head-cfa DOT cfa DOT harvard DOT edu>

Thanks, Elfyn,

> I believe I have found the problem. In order for your program to work as
> expected you will need SA_INTERRUPT , which is not defined in
> /usr/include/sys/signal.h . So it just laggs until it gets to the "Network
> unreachable" error. I'm not to sure the reason why it's not there (?).

The SA_INTERRUPT flag was used by older systems such as Solaris 2.4,
where, contrary to current expectations, all interrupted system calls
were automatically restarted. On those systems, if you set the
SA_INTERRUPT flag, the call would not be restarted, giving the
behavior we now expect. (i.e. its behavior is the opposite of the
SA_RESTART flag that we ordinarily use now to ensure restart of an
interrupted system call. See Stevens Unix Network Programming, p. 121).

So unless this is the official answer, I am doubtful that this is the
actual problem, since by default, connect() should be interrupted by
SIGALRM.

Regards,

Eric


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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