X-Recipient: archive-cygwin@delorie.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=iMQTS0fsyPbgw8UCpqgSsPvAOSFLHPu8CssVIRgV8iOUiIDfuBUuQ
	EG/9/JEKzmi4WA5BpOaTirN6ha7ym6o5vos6371o3AUzm0FKmKgOKM5eEYxMEH+V
	SlkqeYEaPYrDNqBtXm6lVmN9Sfgz9VxdWV7h9+0QllluJZ2OevBtyc=
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=qYLRFLHE20Y08+aSU9MNUG0OEok=; b=JdMuCgMD4BRnX7RUDg4b+rnW8NV0
	9wYJ+p/Z1x9CfoX1q/UJgFp3ZOTtgJdXdfa5kz9oW45cl6CH7icyrjp4ccMT9FVd
	fcdQ31zax1B6JwxHX6VwSjjkvcpqsJZPxQZ8iU88WqFN3BRl/eyqqEsiaY8xPZqA
	U4gcOnT0JNOfr4g=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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: Mon, 23 Feb 2015 13:14:45 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Unexpected EINVAL from pthread_join
Message-ID: <20150223121445.GL437@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <20150222225437.271e929b@tukaani.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;	protocol="application/pgp-signature"; boundary="Mit9XoPEfICDqq/V"
Content-Disposition: inline
In-Reply-To: <20150222225437.271e929b@tukaani.org>
User-Agent: Mutt/1.5.23 (2014-03-12)

--Mit9XoPEfICDqq/V
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Feb 22 22:54, Lasse Collin wrote:
> 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:
>=20
> 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, I'm sorry, but I can't handle that quickly.  Since you're
looking into the code and apparently understanding it, maybe you'd
like to provide patches, too?  Please have a look at
https://cygwin.com/contrib.html.  Patches <=3D 10 lines don't even
need a copyright assignment.


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--Mit9XoPEfICDqq/V
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJU6xm1AAoJEPU2Bp2uRE+gsaQP/j1ihehSi1dYa8JnLHxij7g1
Jb6GfK5HVHmKqLvGXnwEm2HOXuW+tUShZgi/D0yvXJjqSNe9/6k2nMWWAAwSpcWP
qjI4AWQTYJeCxG8CP31HoTyzQ90nKqAuc/lHdVJZlmWLvvlhx0PGDDbT8kFBGj80
6jWQkBKne0CqCVSgZq9hohKk1jFbe0Krn7cNi+jVNv4zWT0hCu1GHp/8D5uknz/5
RxSeMlTb0N6BLyzHWl12GfgEzMZZKClXPpb0iiwSR9zp0KVLVqCvVtOYy3GHQG4p
BScCql1IULDvO0pCnkXVowwlBVqRdmpF5qaPNjr4TKB7XesiPb6zpskqTbbR+o2T
6OEvn5NRyBSyf4a3RCdlC14liCvh3Kba3ppW0toNL2oGX8s7AIKw7VZ8hdEA+HSh
c18PqRwsLx60dHbYKMQ51DAmsuSao83+R0eDOQJooiRYhIhDRD962DgeZarNy1BI
ZczycF4ce4XhSiqBiGgeSHrAZQi5+XPdbsdgBQqDsz+oM++0N0rMwXUgyEbVKJOD
ncwD/G7/1GwjiStDWIsliSfoqIyyaA0kER4kihgJAAo7ZPLt3rQuzPXwEDAdpZsH
UN9pptbx/9W7Nor3T5iIirczKrl07QJO1/CZG2fmS+8KXDnllVLIB+SnBeYRQrLP
NIxyVpGNvXjRIYFVApHS
=UMBW
-----END PGP SIGNATURE-----

--Mit9XoPEfICDqq/V--
