X-Spam-Check-By: sourceware.org Date: Mon, 6 Feb 2006 00:09:28 -0500 From: Christopher Faylor 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: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/