On Mon, Feb 24, 2003 at 12:57:26PM -0500, Eric Mandel wrote: > > Cygwin version: 1.3.20-1 > Win OS tested: NT 4.0/SP6 and XP > > I have an application that calls alarm() before connect() in order to > prevent connect() from hanging if the host is down or non-existent. > When alarm() goes off, it sends the SIGALRM signal, which interrupts > the connect() system call. This works under Linux, Solaris, OSF, and > Mac OS X, but apparently not under Cygwin. As shown in the appended > code, the alarm does go off and can trigger an associated alarm > function, but the connect() system call is not interrupted.
The Cygwin connect() call isn't interruptible so far. It's still implemented by just calling the WinSock connect() plus some magical hocus-pocus afterwards. It's possible to change it to an interruptible call but that requires some coding. In the meantime, how about using a non-blocking connect() and a call to select() instead? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:[EMAIL PROTECTED] Red Hat, Inc. -- 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/