diff options
author | Christopher Faylor <me@cgf.cx> | 2011-11-25 01:38:17 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-11-25 01:38:17 +0400 |
commit | e553226cfadf92a3f394a4dc40b6471d62070173 (patch) | |
tree | b1881dd34dc2c15494df31f9e7b73a318cbe6d79 /winsup/cygwin/cygthread.cc | |
parent | ef8bff85be3057385b34a4c0f8ba2b274041ffcc (diff) |
missed this in previous checkin
Diffstat (limited to 'winsup/cygwin/cygthread.cc')
-rw-r--r-- | winsup/cygwin/cygthread.cc | 7 |
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; } |