X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Date: Sun, 10 May 2009 02:06:25 +0200 Message-ID: <9f8a01cd0905091706s6944a639m8da2f943212cc178@mail.gmail.com> Subject: How to detect a cygwin thread? From: Piotr Wyderski To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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? There is a function extern "C" DWORD cygwin_internal() specified as "This function gives you access to various internal data and functions", so perhaps it could help me? If not, then how do I achieve the goal specified above? Best regards Piotr Wyderski -- 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/