* tclsh does not export changes to env to child process @ 2015-06-29 21:45 Stas Maximov 2015-06-30 3:28 ` Yaakov Selkowitz 2015-06-30 16:39 ` Stas Maximov 0 siblings, 2 replies; 5+ messages in thread From: Stas Maximov @ 2015-06-29 21:45 UTC (permalink / raw) To: cygwin 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: tclsh does not export changes to env to child process 2015-06-29 21:45 tclsh does not export changes to env to child process Stas Maximov @ 2015-06-30 3:28 ` Yaakov Selkowitz 2015-06-30 16:39 ` Stas Maximov 1 sibling, 0 replies; 5+ messages in thread From: Yaakov Selkowitz @ 2015-06-30 3:28 UTC (permalink / raw) To: cygwin On Mon, 2015-06-29 at 14:45 -0700, Stas Maximov wrote: > 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 There is no 'tclsh 8.5' package. Your test case works for me with the /usr/bin/tclsh provided by our tcl-8.5.18-1 package. Are you using some other tclsh? -- Yaakov -- 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: tclsh does not export changes to env to child process 2015-06-29 21:45 tclsh does not export changes to env to child process Stas Maximov 2015-06-30 3:28 ` Yaakov Selkowitz @ 2015-06-30 16:39 ` Stas Maximov 2015-06-30 16:43 ` Stas Maximov 1 sibling, 1 reply; 5+ messages in thread From: Stas Maximov @ 2015-06-30 16:39 UTC (permalink / raw) To: cygwin 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.maximov@gmail.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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: tclsh does not export changes to env to child process 2015-06-30 16:39 ` Stas Maximov @ 2015-06-30 16:43 ` Stas Maximov 2015-07-05 2:55 ` Duncan Roe 0 siblings, 1 reply; 5+ messages in thread From: Stas Maximov @ 2015-06-30 16:43 UTC (permalink / raw) To: cygwin 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 <stas.maximov@gmail.com> 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 <stas.maximov@gmail.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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: tclsh does not export changes to env to child process 2015-06-30 16:43 ` Stas Maximov @ 2015-07-05 2:55 ` Duncan Roe 0 siblings, 0 replies; 5+ messages in thread From: Duncan Roe @ 2015-07-05 2:55 UTC (permalink / raw) To: cygwin > > On Mon, Jun 29, 2015 at 2:45 PM, Stas Maximov <stas.maximov@gmail.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. > On Tue, Jun 30, 2015 at 9:39 AM, Stas Maximov <stas.maximov@gmail.com> 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 Tue, Jun 30, 2015 at 09:43:27AM -0700, Stas Maximov wrote: > 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 > > Years ago I seem to recall a problem with tclsh not exporting amended environment variables. Looks like it's fixed now though, at least on my Linux system (sorry it's tclsh 8.6) > 12:37:18$ env|grep ZXC > 12:37:31$ tclsh > % set env(ZXC) hello > hello > % puts $env(ZXC) > hello > % puts [exec /bin/bash -c {echo $ZXC}] > hello > % info vars > tcl_rcFileName tcl_version argv0 argv tcl_interactive auto_path auto_index env tcl_pkgPath tcl_patchLevel argc tcl_library tcl_platform > % puts $tcl_patchLevel > 8.6.1 > % exit Cheers ... Duncan. -- 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-05 2:55 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-06-29 21:45 tclsh does not export changes to env to child process Stas Maximov 2015-06-30 3:28 ` Yaakov Selkowitz 2015-06-30 16:39 ` Stas Maximov 2015-06-30 16:43 ` Stas Maximov 2015-07-05 2:55 ` Duncan Roe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).