Unexpected EINVAL from pthread_join
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Feb 23 12:59:00 GMT 2015
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:
>
> 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 <= 10 lines don't even
need a copyright assignment.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150223/18e2d3cd/attachment.sig>
More information about the Cygwin
mailing list