delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/06/30/12:39:55

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=QD
QRvqxiKE1ek6ysJYBQVJtEVgMZQ3s/LprsxiFAitPSgViS6bZ2/u5TztfX3/iasc
J1LuZw82ceDthQ77mZwyg1CT6USpjR7YKwCJuumWWzy096+0DHlMdBIjhubPNVi5
NEyQKDTBD0Esd0MVByEyTKf4fuhkPQAL6qLzrTmoo=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=wlX9sln0
82r0r4rjbHAFmRMyE3M=; b=dR75QBMDCk3zmjURuqBkWBOJkfK5NAfx3HANUEui
5kZZz3EY8jVVH/KxCHGUW/rhcwjEU3MlYa3IbYuEsGlO1SVQOS5Ki51VJ9awso5f
gnlLdCrjzPb2kC3YhLZ/rnLjlgfjmzbggy5mXaHV5Q3htaHOwwpDAhxNjQA2uuOB
isU=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.5 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_TK,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2
X-HELO: mail-la0-f46.google.com
MIME-Version: 1.0
X-Received: by 10.112.10.138 with SMTP id i10mr13707753lbb.43.1435682375161; Tue, 30 Jun 2015 09:39:35 -0700 (PDT)
In-Reply-To: <CAO-z7kzjRBrADMYd1h79=VTdY8ME9jLKrFgg+-SFZvRDWduScw@mail.gmail.com>
References: <CAO-z7kzjRBrADMYd1h79=VTdY8ME9jLKrFgg+-SFZvRDWduScw AT mail DOT gmail DOT com>
Date: Tue, 30 Jun 2015 09:39:35 -0700
Message-ID: <CAO-z7ky+2C37Y_kEjbwVoXEfcb_xwNeOBCex3wTKfBVHisuLBw@mail.gmail.com>
Subject: Re: tclsh does not export changes to env to child process
From: Stas Maximov <stas DOT maximov AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Yakov,

Thanks for the reply.

Apologies for confusion. 8.5 was version of tcl as reported by
tcl_version. Please find below more information. Note that
"filename_val" is printed only once -- by tclsh, but the child (bash)
does not see environment variable FILENAME.

Any specific information that you might want to see?

Stas.


$ which tclsh
/usr/bin/tclsh

$ cygcheck.exe -c tcl cygwin
Cygwin Package Information
Package              Version        Status
cygwin               2.0.4-1        OK
tcl                  8.5.18-1       OK

$ cat test_env_export1.tcl
set env(FILENAME) filename_val
puts $env(FILENAME)
puts [exec /bin/bash -c {echo $FILENAME}]
puts $env(EDITOR)
puts [exec /bin/bash -c {echo $EDITOR}]

$ tclsh test_env_export1.tcl
filename_val

vim
vim


On Mon, Jun 29, 2015 at 2:45 PM, Stas Maximov <stas DOT maximov AT gmail DOT com> wrote:
> Hi,
>
> Tcl shell does not export changes to array variable env:
>   http://wiki.tcl.tk/env
>
> Test script: test_env_export1:
> --------- begin ----------
> set env(FILENAME) filename_val
> puts $env(PATH)
> puts [exec /bin/bash -c {echo $PATH}]
> puts $env(FILENAME)
> puts [exec /bin/bash -c {echo $FILENAME}]
> --------- end ----------
>
> Expect two lines of output "filename_val", receive only one. The bug
> affects 'guitool' feature of git-gui.
>
> cygwin 2.0.4-1
> tclsh 8.5
>
>
> Thanks,
> Stas.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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