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=Jb aipTFadmAMK+MJKOUZUKKoGssTehgzxmhEryvyE/jLw8CbtxZUXWIeJb8eeUs13K S1oQiXuogvE0k6MKrpD0ZvqfIX5L1aoth+sbrj3U/dF5uAtXsblqLoWCf4pQGGWT ydwC2mgEChLHzawkjA5ilASrs3SNUxjwM0l/CbBqM= 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=6OUx1q7Y i/SvuGPuuzs2a+LY2m8=; b=DAZY0JYRcrxYZZmmuJ7SB+rVQS+DgyHHv3E6nfYl vgX1d3aoolm6i5Q4jQ374XeTQhem6IsklDwob5oSfb//ve2Y8ZFXbxuq7HGIHnlp lfB20oK3R22rcEAtF8J+InjURh3hD+zt4OiBZSvt3ZCdqrOb9gOOt8+BQneQMlfU HFw= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.0 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-f52.google.com MIME-Version: 1.0 X-Received: by 10.152.21.5 with SMTP id r5mr20530390lae.24.1435682607420; Tue, 30 Jun 2015 09:43:27 -0700 (PDT) In-Reply-To: References: Date: Tue, 30 Jun 2015 09:43:27 -0700 Message-ID: Subject: Re: tclsh does not export changes to env to child process From: Stas Maximov To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Interestingly, if environment variable FILENAME was exported when tclsh called, the test passes. Tclsh falis to export only new env variable. Compare two results: $ env FILENAME=gaga tclsh test_env_export1.tcl filename_val filename_val vim vim $ env -u FILENAME tclsh test_env_export1.tcl filename_val vim vim On Tue, Jun 30, 2015 at 9:39 AM, Stas Maximov wrote: > 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 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