delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/02/22/15:55:03

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:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=ANf
fuazDlirC9LyHmRWNPVhrhMt2jM1ZfC24pt9421p+nzlNCTBZc6mdMymrArQT2dk
xTP/ZK6y1bxfwmi0paE1j/7hce2zCLelD56RKKusoDfZRuyAJ4SI9tvRXPuyounD
bGILbKiIFoe9/dAX0RgpghuUVmsO0OmNNF5lLgRo=
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:mime-version
:content-type:content-transfer-encoding; s=default; bh=glr219OuY
fdOXlaS6KRUV8MJnVE=; b=di3wL1NOgk3FrXYTLBfMChCo0GlN8B1BOqowAzcIE
owrmAMzfJ4uqYZWoBqy3haB2mYDWqmwLV0Dh3LSGoVgOaYh5KYemBc7nk8vTPZ0A
vpaSCc8qduJVrtnthzlalgl8RNCKjkZI6yRImBzTzQJuoisqANgVdZMMx3bqCVCs
TY=
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.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: mailscanner02.zoner.fi
Date: Sun, 22 Feb 2015 22:54:37 +0200
From: Lasse Collin <lasse DOT collin AT tukaani DOT org>
To: cygwin AT cygwin DOT com
Subject: Unexpected EINVAL from pthread_join
Message-ID: <20150222225437.271e929b@tukaani.org>
MIME-Version: 1.0
X-Antivirus-Scanner: Clean mail though you should still use an Antivirus
Received-SPF: none
X-IsSubscribed: yes

It seems that a signal can cause pthread_join to incorrectly return
EINVAL. I debugged it only a little but hopefully someone finds this
useful:

In the file thread.cc, function pthread::join, the call to cygwait may
return WAIT_SIGNALED if a signal is sent to the process. The switch
statement handling the return value assumes that only WAIT_OBJECT_0 and
WAIT_CANCELED are possible. The default section of the switch statement
has a comment "should never happen" and it returns EINVAL. It might be
that the problem occurs only when SA_RESTART isn't used.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019