X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18Tdof0sMu38ot34+FkCZ58 Date: Thu, 6 Dec 2012 20:27:53 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: sigwait() ignores non-thread-specific pending signals Message-ID: <20121207012753.GA10201@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <50C09142 DOT 1090904 AT mathematik DOT uni-kl DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50C09142.1090904@mathematik.uni-kl.de> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: 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 Thu, Dec 06, 2012 at 01:36:18PM +0100, Andreas Steenpa? wrote: >I have noticed that sigwait() does not return immediately if called in >the following situation: >* One of the signals the command is looking for isalready pending. >* This signal was send to the entire process rather than to a specific >thread. >* sigwait() is called from a thread other than the 'main' thread. > >Look at the test case below. The function test_sigwait() is first called >from the 'main' thread and then from another thread created in main(). >This should not make a difference here, but the function shows different >behaviour. > >My interpretation is that sigwait() simply forgets to look for >non-thread-specific signals which are already pending at the time when >it is called. I don't see any difference between Cygwin and Linux when I run the test program. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple