How to detect a cygwin thread?

Mark Geisert
Sun May 10 18:53:00 GMT 2009

Piotr Wyderski writes:
> > Why assume Cygwin could be the only source of extra threads?
> There is no such assumption. But Cygwin is the only
> source of threads that can stop the program entirely,
> so they must be treated in an exceptional way.

Well, I guess you must be aware of *all* sources of external threads so that you
*know* none of them besides a Cygwin thread could stop the program entirely. 
Such as, a thread Windows may inject to post some event to the process.  OK, if
you say so.
> > Wouldn't it make more sense to have your program remember its own threads and
> > only suspend those?
> No, the snapshot should be as exact as possible,
> including "alien" threads. It has already proven to
> be of key importance.

This I can understand.

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.


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list