This is the mail archive of the
mailing list for the Cygwin project.
Re: How to detect a cygwin thread?
On Sun, May 10, 2009 at 06:53:21PM +0000, Mark Geisert wrote:
>So it looks like your original question could be restated as "Is there
>an API in Cygwin that allows an application to enumerate all Cygwin
>threads in the app, including internal Cygwin threads?". I don't know
>of any but maybe somebody else on the list does.
The closest API to it would be a call to
Where <windows-thread-id> is a DWORD denoting the thread as
per GetCurrentThreadId, etc.
If the return value is "unknown (<windows-thread-id>)" then Cygwin
doesn't know about it. Otherwise it is a important cygwin thread.
I haven't checked to see if some actual Cygwin threads show as
with "unknown ..." though.
Check the source code for more details but be advised that the it's
entirely possible that this interface may not work at all. This is an
as-is undocumented interface and we make no guarantees that its
behavior will remain consistent across releases.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html