Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2021-11-22 14:33:47 +0300
committerCorinna Vinschen <corinna@vinschen.de>2021-11-22 14:37:12 +0300
commit24bffff63eb798d721b75b1c38c18f1687d33a2a (patch)
treec900ed0b8b217f98263cf227143797d55ebd58e7
parentd54d8f173d66c7659061de664d445458737b4a75 (diff)
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>
-rw-r--r--winsup/cygwin/signal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index bd1168e90..f4b468664 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -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);
}