delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/06/00:09:40

X-Spam-Check-By: sourceware.org
Date: Mon, 6 Feb 2006 00:09:28 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: signal is not delivered to the handler
Message-ID: <20060206050928.GA15260@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <BAY102-F1419989AED32B053AE39DABD0E0 AT phx DOT gbl>
Mime-Version: 1.0
In-Reply-To: <BAY102-F1419989AED32B053AE39DABD0E0@phx.gbl>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

On Mon, Feb 06, 2006 at 02:34:15AM +0000, Michael Tang wrote:
>I ran into a problem with the latest cygwin1.dll (1.5.19-cr-0x5ef):
> 1. the main thread creates a udp socket and set up a sigal handler for 
>SIGALRM
> 2. the main thread creates a new thread T
> 3. the main thread calls "recvfrom" on the udp socket" and block there
> 4. thread T waits 2 second and sends a signal SIGALRM to the main thread
> 5. the main thread fails on "recvfrom" and goes to step 2 again.
>
>The problem is, at the second time, after the new thread T sends the 
>SIGALRM, the signal does not trigger the signal handler any more. the 
>program hangs.
>
>The program works (never hangs) with an older version of cygwin1.dll 
>(1.3.22-dontuse-21).

When reporting problems, please use actual version numbers from cygwin
releases.  Or do you think it's a good idea to use something with a
"dontuse" tag?  If you are finding cvs tags, I guarantee you that you
don't know what they are or what they relate to.

You're right that this is a bug in 1.5.19-4.  I'll fix it in the next
snapshot.

There are actually two bugs here.  Apparently recvfrom isn't honoring
the SA_RESTART flag.  I can't guarantee that will be fixed in the next
snapshot, though.

Thanks for the test case.

cgf

--
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