delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=m4TMhsDsFeCDm+e3SAAMVqrmqHc3Q/1pH/syuZFDl2/05Q60UouCj | |
P9q7Nem5/xupv+Xikqnu4OP3J+e/4LAGkQCgIkNQiD8Wr+ZYi1RoLTyXryGjZv19 | |
ZYXjG2YNTblgwHiM5SKUZ/IU+KE0zn0Ss/wqcMgNcUAM3KHGBugXpw= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=N5UF6hauyoJxTHH7hi2idpBuoNM=; b=rssQAGqNhuHBMKZdxJKEC7jdL8+v | |
VF4CdjisFBX81/WH8cUpcFOFCskaSR+TBenvfm63c5FqH293RH9Klffkve7ZCT+x | |
NrRuoPysItHOS6Vce0VRlgQ/QMFB+QWKZrS0XThP1R+NNAEUStKjM7PjkD6IAohf | |
QJpiJVTJftG0JNQ= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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 |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=1.2 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 |
X-HELO: | mho-02-ewr.mailhop.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: | U2FsdGVkX19wsJ4Dzdb2e4WN6BrMuHVz |
Date: | Fri, 15 Nov 2013 14:21:38 -0500 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Intermittent failures retrieving process exit codes |
Message-ID: | <20131115192138.GA6128@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <50C2498C DOT 2000003 AT coverity DOT com> <50C276AC DOT 9090301 AT mailme DOT ath DOT cx> <50D401EF DOT 9040705 AT coverity DOT com> <52844B2E DOT 5050902 AT coverity DOT com> <EFA04305-A94A-46F4-BCCE-8FB3ADA45E72 AT Denis-Excoffier DOT org> |
MIME-Version: | 1.0 |
In-Reply-To: | <EFA04305-A94A-46F4-BCCE-8FB3ADA45E72@Denis-Excoffier.org> |
User-Agent: | Mutt/1.5.20 (2009-06-14) |
On Fri, Nov 15, 2013 at 07:53:26PM +0100, Denis Excoffier wrote: >On 2013-11-14 05:01, Tom Honermann wrote: >> On 12/21/2012 01:30 AM, Tom Honermann wrote: >>> >>> The workaround I implemented within Cygwin was simple and sloppy. I >>> added a call to Sleep(1000) immediately before the call to ExitThread() >>> in wait_sig() in winsup/cygwin/sigproc.cc. Since this thread (probably) >>> doesn't exit until the process is exiting anyway, the call to Sleep() >>> does not adversely affect shutdown. The thread just gets terminated >>> while in the call to Sleep() instead of exiting before the process is >>> terminated or getting terminated while still in the call to >>> ExitThread(). A better solution might be to avoid the thread exiting at >>> all (so long as it can't get terminated while holding critical >>> resources), or to have the process exiting thread wait on it. Neither >>> of these is ideal. Orderly shutdown of multi-threaded processes is >>> really hard to do correctly on Windows. > >I experience on Windows 7 (not on XP) some problems that may be related. >I would like to test your workaround, but sigproc.cc has much changed since >then, there is now an exit_thead function with the comment "Exit the current >thread very carefully.". I tried to insert Sleep(1000) at the end of >exit_thread, immediately before "ExitThread (0)", but this yielded no >change at all. > >Could someone be kind enough to update the workaround for modern sigproc.cc? You apparently are misunderstanding the whole point of the changes to sigproc.cc. They were to work around this very problem. 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |