Subject: cygwin 'expect' bug?; set foo [exec //MYPC/C$/...]
From: anonb6e9@nyx3.nyx.net (Name withheld by request)
Date: 12/10/2007 5:20:38 PM
Before I report this to the cygwin developers, I wanted to be sure it
was a real bug.. Please take a look at the two line 'expect_test00'
script below; then search for "couldn't execute". The issue concerns
running exec on a path starting with '//' (one of the "/"s is
removed?). The same script works fine in cygwin tclsh see "tcl_test00"
script below.
Is this a cygwin expect bug or not?
--
thanks,
Tom
cygwin bash session:
--v-v------------------C-U-T---H-E-R-E-------------------------v-v--
$ export unc_date=$(cygpath -aw /usr/bin/date|sed -e 's~\\~/~g' -e "s~^\(.\):~//$COMPUTERNAME/\1\$~")
$ echo $unc_date
//OurWorkStn00/c$/aut/cyg/bin/date
$ cat >expect_test00 <<\%%%
> #!/usr/bin/expect --
> set _unc_date $env(unc_date)
> set foo [exec $_unc_date]
> %%%
$ cat expect_test00
#!/usr/bin/expect --
set _unc_date $env(unc_date)
set foo [exec $_unc_date]
$ chmod +x expect_test00; ./expect_test00
couldn't execute "/OurWorkStn00/c$/aut/cyg/bin/date": no such file or directory
while executing
"exec $_unc_date"
invoked from within
"set foo [exec $_unc_date]
"
(file "./expect_test00" line 3)
$ sed -e 's~expect --~tclsh~' expect_test00 > tcl_test00
$ chmod +x tcl_test00;./tcl_test00
$ echo 'puts "foo: $foo"' >> tcl_test00
$ cat tcl_test00
#!/usr/bin/tclsh
set _unc_date $env(unc_date)
set foo [exec $_unc_date]
puts "foo: $foo"
$ ./tcl_test00
foo: Mon Dec 10 10:46:23 CST 2007
$ uname -a
CYGWIN_NT-5.1 OurWorkStn00 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin
$ cygcheck -c tcltk
Cygwin Package Information
Package Version Status
tcltk 20060202-1 OK
$
|