This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to detect a cygwin thread?


Piotr Wyderski writes:
> My program has a built-in panic handler, which enumerates
> all process threads using the CreateToolhelp32Snapshot
> WinAPI function and then suspends them (except itself)
> in order to freeze the entire environment in a state as close
> as possible to the original error conditions. Unfortunately it
> also stops the internal Cygwin thread (which seems to spend
> most of its time in cygwin1.dll!toascii+0x15d0) and the entire
> process hangs. Is there a way to identify those Cygwin
> threads in order not to suspend them?

Why assume Cygwin could be the only source of extra threads?

Wouldn't it make more sense to have your program remember its own threads and
only suspend those?  Presumably you know when and where your program's threads
are created and destroyed, right?

..mark




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]