delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4498EABF.2040605@arkasoft.com> |
Date: | Wed, 21 Jun 2006 07:44:15 +0100 |
From: | Kaveh Goudarzi <kaveh AT arkasoft DOT com> |
User-Agent: | Thunderbird 1.5.0.4 (Windows/20060516) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Thread Injection + Cygwin problems |
References: | <449729AA DOT 4030007 AT arkasoft DOT com> <e77avt$oj9$2 AT sea DOT gmane DOT org> <20060620142945 DOT GH19534 AT trixie DOT casa DOT cgf DOT cx> |
In-Reply-To: | <20060620142945.GH19534@trixie.casa.cgf.cx> |
X-DSPAM-Result: | Innocent |
X-DSPAM-Processed: | Wed Jun 21 07:44:24 2006 |
X-DSPAM-Confidence: | 0.7829 |
X-DSPAM-Probability: | 0.0000 |
X-DSPAM-Signature: | 4498eac8229051527717022 |
X-DSPAM-Factors: | 27, |
X-Spam-Score: | 1.194 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
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 |
Hi, > The problem may be due to the fact that the injected thread doesn't have > a cygtls area. If the thread is injected prior to the completion of > cygwin's initialization or if it somehow bypasses the DLL_THREAD_ATTACH > phase of the initialization (which was one problem that I had to deal > with in the dreaded "cygwin loops forever" problem) then there will be > no cygtls area and using cygwin functions will be problematic. Thanks for the info ... The sequence of calls I make are GetModuleHandle ('cygwin1.dll') followed by calls to cygwin functions ... doesn't the GetModuleHandle only return after the proper initialization of the the dll and therefore cygwin? if not ... is there anything I can look out for programatically in the injected code? As for the cygtls area ... is this something necessary for proper functioning of cygwin calls? (I looked at the source ... but none the wise I'm afraid :-( ) ... Empirically I see getenv working now "all" the time but the call to cyg_internal seems to fail with regularity. Is this expected? > The fix in the snapshots more-or-less assumes that any injected thread > is not going to try to use cygwin functions so, as of right now, it > may not be possible to do what the OP wanted. Is there any other way of gaining access to a running cygwin processes environment variables? thanks again for your time. Kaveh. -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |