From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17027 invoked from network); 24 Jul 2000 08:14:45 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Jul 2000 08:14:45 -0000 Received: (qmail 11669 invoked by alias); 24 Jul 2000 08:14:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12349 Received: (qmail 11662 invoked from network); 24 Jul 2000 08:14:32 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: "Zsh hackers list" Subject: RE: Cygwin: environ problem Date: Mon, 24 Jul 2000 12:14:26 +0400 Message-ID: <000001bff547$2e7fe500$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-reply-to: <0FY10078PTYVGJ@la-la.cambridgesiliconradio.com> > > Andrej wrote: > > We _could_try_ to directly manipulate __cygwin_environ, but I do not > > like it - who knows, where and how it is used. BTW comments > imply, that > > DLLs should actually refer to __cygwin_environ :-) > > Without some major rewriting, we may have to: the > export-related machinery > assumes it has direct control of the (new) environment's > memory. There is unfortunately one more problem. Even if we play with __cygwin_environ, we need to keep local environ's in sync. This is done inside of cygwin.dll with update_envptrs() function. This function is local and is not exported (strictly speaking, it does not appear in any stub library that is installed with cygwin). The private per-DLL user structures are hidden as well. So, we have no official way to inform cygwin about changed environment location. Please, note - that is currently true even without dynamic loading! But in this case we at least know, that there is single environ variable, so we can just update both environ and __cygwin_environ. -andrej