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=RH+1XM6cv0kEJwOwTnPnWlIuQLDD54fidN+AG1Er+rqNbM8j/dl7Q | |
AzD9MIepI5sBBV7XAze3RTx6D/mGnNrBeQMCYaJbccXxZuz9SU9K0i64RLNscMMQ | |
YAKkc2K7Y3wW1XU+M3JQp7vyhsq5OvudonMzUbZiFGjtr7juHKU2Eg= | |
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=Fz/E7J7c+AtPUMnKMdsdLI7LLhM=; b=QjZjGD42TGTSSl0p0S8lzTVl7SHc | |
apBRzG7LragQwTzD1Dq1gczi1aqvCUFrZe+gc2a+XoZe3DzkTyn5/OLfbRKVHASj | |
3G20WxDStmNMQPMc2sx1oEIAxCGqrOBr4Mav9qpaa++DXym7bbMWK+lnmJhzL+RT | |
ciy/cgh3ntl1LS8= | |
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=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Tue, 24 Feb 2015 16:25:54 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Unexpected EINVAL from pthread_join |
Message-ID: | <20150224152554.GM437@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <20150222225437 DOT 271e929b AT tukaani DOT org> <20150223121445 DOT GL437 AT calimero DOT vinschen DOT de> <20150223125914 DOT GO437 AT calimero DOT vinschen DOT de> <20150223140317 DOT GP437 AT calimero DOT vinschen DOT de> <20150224155458 DOT 33ff024a AT tukaani DOT org> |
MIME-Version: | 1.0 |
In-Reply-To: | <20150224155458.33ff024a@tukaani.org> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--KCBbHYs95wY/7dOt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Feb 24 15:54, Lasse Collin wrote: > On 2015-02-23 Corinna Vinschen wrote: > > On second thought, this is not the right way to handle this. The > > WAIT_SIGNALED is returned because we're in the main thread and > > SA_RESTART is not set, as you assumed above. This leads to the > > question why this scenario isn't handled directly in cygwait. > >=20 > > So what I did now is to apply the below patch to CVS. It adds a flag > > cw_sig_restart to cygwait, which also restarts in the main thread if > > SA_RESTART is not set, as it's supposed to be for pthread_join. > >=20 > > I uploaded a new developer snapshot to https://cygwin.com/snapshots/ > > Can you please test if it works as desired? >=20 > The snapshot 20150223 works. (The earlier patch worked too.) Thank you. Good to read that, thanks! > Many other pthread functions are similar in sense that they must never > return EINTR. A bug similar to the one in pthread::join exist in > pthread_mutex::lock. If SA_RESTART isn't used, signals can make > multiple threads get a lock on the same mutex at the same time. A test > program is attached. Adding cw_sig_restart to the cygwait call in > pthread_mutex::lock fixes this. Can you collect the info which functions are affected so that lazy me just has to apply the cw_sig_restart patches in bulk? Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --KCBbHYs95wY/7dOt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU7JgCAAoJEPU2Bp2uRE+gHIQQAJUIIwux0jC3JNsRhqExN5L1 J6YaaaF5XJgemsrbHt32YCFQ9nHCYsh4z9IwSz+m5FBnjb4OEwBHUcwVIiq+un8A JXBbXIJlGCy5kaMNS4yGl8zKMKo5tykxe8Q+mY+Yd5Qg8cA0s+HQkLWBbU81i4q4 7OsXRMeJ1CZpkEwx7D/nP331guTuyhvJkf6E4UiAhII+xE2pXF+HwtzwaEGJS8DC FQgmK3xQjLOkdvVsNR5xa2EOu8Lm3gCoPam1yh3YAYa+sbNXqbsOmBqQJ7b/Je6M 9YZghHi5IRG2uupYVAiTWYp2embSrEX8WCbIITbPgpl+d2XYdwxIvM5prk0h4Zk+ s4t+EyWxKm4ERTGaNI5XskPCL+Jx06t0eUp/DO9YT9fWu4/qQ30nuy6fX9d3+x9R QF6oosA0P6ZDo6OZbbGR+nNMDZ0X87+ghGc6RDpK1/Z3jkkZ5CJqUTUG/RU18Ni+ G2JOwVlwYpr7JRNmaUB6Ctu1IY3kmLpaDuPFhU4lQsJPJrqR32Bl+KLycHO1TmHv +nqIY20uUyEIUSpINWMnCRb8hRLSBDSqxCRNWXN/5RU9KRHHwV7D5+tMdrkm5UtW Objt31j2vAlxkS/55GcciCItEm+QeKMv7lQ34n/LMG36gVGERXt4Aq8Its0y5M9P QTYQj14IIkLTDTgXGcDi =115G -----END PGP SIGNATURE----- --KCBbHYs95wY/7dOt--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |