This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin-1.7.7: tclsh84 does not pass environment to exec sub-process

Hi Stas,

This may help you. I had the need to compile a more recent version of expect on cygwin for my open source project expect-lite. Expect is built on TCL, and I used the most recent version 8.5.9.

I have put the recent version of expect up at:

Alas it is not a cygwin package yet, just a tarball. You will want to untar in from /
There is no tclsh executable, but there is an executable expect, which includes all the tcl stuff as well.

This will give you an idea of tcl version 8.5.9 will solve your environment problems.

good luck,


On 10/29/10 7:39 PM, Stas Maximov wrote:

Using cygwin 1.7.7, tclsh84 does not pass its environment to a sub-process created with exec command.

Test case:

# Starting from cygwin bash command line,
# record your current environment
$ env | sort>  env0.txt

# Start tclsh84
$ tclsh84

# Execute the same command from tclsh84, exit
% exec env | sort>  env1.txt
% exit

# Compare two environments
$ diff -u env0.txt env1.txt

# Observe large number of environment variables not present in env1.txt.


1. Is this new to 1.7? My vague recollection is that this was not a problem in cygwin 1.5.
2. Is there a quick workaround? E.g. tclsh flag or environment variable or replacing cygwin1.dll with older version.

Please CC me when replying.

Best regards,

-- Problem reports: FAQ: Documentation: Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]