mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-28 03:27:46 +08:00
Cygwin: raise: fix check for multithreaded process
The check for the pthread self pointer in TLS is misleading, given the main thread has this pointer initialized as well. Check for the global __isthreaded flag as well. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
d54d8f173d
commit
24bffff63e
@ -301,7 +301,7 @@ extern "C" int
|
||||
raise (int sig)
|
||||
{
|
||||
pthread *thread = _my_tls.tid;
|
||||
if (!thread)
|
||||
if (!thread || !__isthreaded)
|
||||
return kill (myself->pid, sig);
|
||||
return pthread_kill (thread, sig);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user