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:
authorChristopher Faylor <me@cgf.cx>2011-11-25 01:38:17 +0400
committerChristopher Faylor <me@cgf.cx>2011-11-25 01:38:17 +0400
commite553226cfadf92a3f394a4dc40b6471d62070173 (patch)
treeb1881dd34dc2c15494df31f9e7b73a318cbe6d79 /winsup/cygwin/cygthread.cc
parentef8bff85be3057385b34a4c0f8ba2b274041ffcc (diff)
missed this in previous checkin
Diffstat (limited to 'winsup/cygwin/cygthread.cc')
-rw-r--r--winsup/cygwin/cygthread.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
index f57cdcec8..2bb8e412f 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -258,12 +258,15 @@ cygthread::name (DWORD tid)
break;
}
- if (!res)
+ if (res)
+ /* ok */;
+ else if (!_main_tls)
+ res = "main";
+ else
{
__small_sprintf (_my_tls.locals.unknown_thread_name, "unknown (%p)", tid);
res = _my_tls.locals.unknown_thread_name;
}
-
return res;
}