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/