Don't enforce SA_RESTART in non-main threads

* exceptions.cc (_cygtls::call_signal_handler): Disable enforcing
	SA_RESTART in non-main threads to allow returning with EINTR from
	system calls.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2015-06-15 16:15:37 +02:00
parent 325926031b
commit 95c5a3f6b7
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2015-06-15 Corinna Vinschen <corinna@vinschen.de>
* exceptions.cc (_cygtls::call_signal_handler): Disable enforcing
SA_RESTART in non-main threads to allow returning with EINTR from
system calls.
2015-06-11 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 5.

View File

@ -1542,7 +1542,12 @@ _cygtls::call_signal_handler ()
set_errno (this_errno);
}
return this_sa_flags & SA_RESTART || (this != _main_tls);
/* FIXME: Since 2011 this return statement always returned 1 (meaning
SA_RESTART is effective) if the thread we're running in is not the
main thread. We're disabling this check to enable EINTR behaviour
on system calls not running in the main thread. It's not quite clear
if that has undesired side-effects, therefore this comment. */
return this_sa_flags & SA_RESTART;
}
void