Tcl Source Code

View Ticket
Login
Ticket UUID: 678400
Title: exec quoting problem (io.test fails if wd contains spaces)
Type: Bug Version: obsolete: 8.4.1
Submitter: kennykb Created on: 2003-01-31 21:27:40
Subsystem: 25. Channel System Assigned To: davygrvy
Priority: 8 Severity:
Status: Closed Last Modified: 2004-06-01 18:12:19
Resolution: None Closed By: davygrvy
    Closed on: 2004-06-01 11:12:19
Description:
Win2k and WinXP:

Attempting to run the regression test suite in a directory whose
path name contains whitespace results in test failures in
io-14.9 and io-29.32.

Test suite output is attached.
User Comments: davygrvy added on 2004-06-01 18:12:19:
Logged In: YES 
user_id=7549

closing.

kennykb added on 2004-03-27 05:49:34:
Logged In: YES 
user_id=99768

io.test now does not fail.

davygrvy added on 2004-02-01 16:36:12:
Logged In: YES 
user_id=7549

My error, this is not related to TclpCreateProcess's argv 
handling.  Looks like pure script usage.

Is the test suite ok now?

davygrvy added on 2003-12-17 07:17:40:
Logged In: YES 
user_id=7549

Working on a patch in https://sourceforge.net/tracker/?
func=detail&aid=672938&group_id=10894&atid=110894

davygrvy added on 2003-10-03 05:35:52:

File Added - 63254: tcl_bcl.txt

Logged In: YES 
user_id=7549

Here's a different XXX_BuildCommandLine() that I use in 
Expect-Win32.  Does this solve stuff?

BuildCommandLine() and the shell's setargv() must be 
complimentary.  But more importantly, BuildCommandLine() 
must follow the CreateProcess() quoting rules exactly so it 
works for all applications, not just our shell.

dgp added on 2003-02-26 07:23:14:
Logged In: YES 
user_id=80530

See Bugs 672938 and 554068

andreas_kupries added on 2003-02-26 05:24:57:
Logged In: YES 
user_id=75003

David, I remember that we have at least one other bug report 
about quoting issues with exec/windows. And this test failure 
sort of smells like this bug. Can you have a look.

The test uses 'array get/set' to transfer the contents of an 
array to a subprocess, as a single argument. But the space 
in the path messes this somehow up.

andreas_kupries added on 2003-02-26 05:14:35:
Logged In: YES 
user_id=75003

Patch applied to CVS head.

kennykb added on 2003-02-26 04:21:21:
Logged In: YES 
user_id=99768

Andreas's patch fixes all but io-14.9, which appears 
to be a quoting problem in [exec]. Printing
the elements of [lindex $argv 0] in the child process
reveals:

cat = {C:/Documents
and = Settings/kennykb/My
Documents/SourceForge/tcl/win/cat} = longfile
{C:/Documents = and
Settings/kennykb/My = Documents/SourceForge/tcl/win/longfile}
script = {C:/Documents
and = Settings/kennykb/My
Documents/SourceForge/tcl/win/script} = test1
{C:/Documents = and
Settings/kennykb/My = Documents/SourceForge/tcl/win/test1}
test2 = {C:/Documents
and = Settings/kennykb/My
Documents/SourceForge/tcl/win/test2} = test3
{C:/Documents = and
Settings/kennykb/My = Documents/SourceForge/tcl/win/test3}

andreas_kupries added on 2003-02-25 07:08:06:
Logged In: YES 
user_id=75003

Hm, the 29.32 does not look like a whitespace problem. 
Permission denied. It doesn't happen if there is no 
whitespace in the path ?

andreas_kupries added on 2003-02-25 07:04:04:

File Added - 43361: io.test.diff-u

Logged In: YES 
user_id=75003

On linux I saw io-14.9 and io-48.3.
Enclosed a tentative patch. It solves the failures I saw, and I 
also did some changes which might solve 29.32. I am not 
sure. Please test.

kennykb added on 2003-02-01 04:28:20:

File Added - 41192: io.errs

Attachments: