delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/05/10/14:53:53

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Mark Geisert <mark AT maxrnd DOT com>
Subject: Re: How to detect a cygwin thread?
Date: Sun, 10 May 2009 18:53:21 +0000 (UTC)
Lines: 29
Message-ID: <loom.20090510T184100-821@post.gmane.org>
References: <9f8a01cd0905091706s6944a639m8da2f943212cc178 AT mail DOT gmail DOT com> <loom DOT 20090510T004554-316 AT post DOT gmane DOT org> <9f8a01cd0905100245m16838bb9w3c6e494d4a03a4cb AT mail DOT gmail DOT com>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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.

..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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019