X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Sun, 10 May 2009 19:36:29 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: How to detect a cygwin thread? Message-ID: <20090510233629.GC25909@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <9f8a01cd0905091706s6944a639m8da2f943212cc178 AT mail DOT gmail DOT com> <9f8a01cd0905100245m16838bb9w3c6e494d4a03a4cb AT mail DOT gmail DOT com> <20090510202132 DOT GB25909 AT ednor DOT casa DOT cgf DOT cx> <9f8a01cd0905101533i2902636aub172298be61599a5 AT mail DOT gmail DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f8a01cd0905101533i2902636aub172298be61599a5@mail.gmail.com> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Mon, May 11, 2009 at 12:33:07AM +0200, Piotr Wyderski wrote: >Christopher Faylor wrote: >>The closest API to it would be a call to >>cygwin_internal(CW_GETTHREADNAME, ); > >Now it works like a charm. The internal thread which suspension leads >to program hangup is named "sig". Yes, that's the signal thread but I don't know why stopping it would cause any special problems since, if the entire program is stopped, it isn't going to be processing signals. What may be happening is that you are trying to suspend a thread which is blocking in the "ReadFile" call since that is what the "sig" thread is normally doing. If that is the case, then you are going to see problems any time a thread is doing blocking I/O. That would seem to indicate that you can't just generally suspend threads the way you are planning. cgf -- 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/