Artifacts Associated With Ticket 672938ffffffffff
Ticket change [cdb735fd18] (rid 95939) by nobody on 2003-01-23 06:53:35:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
At Tcl 8.3 % exec echo [list 1 2 "3 and 4"] 1 2 {3 and 4} This looks correct to me At Tcl 8.4 % exec echo [list 1 2 "3 and 4"] 1 2 \{3 and 4} Note the extra back-slash at 8.4 which looks wrong to me. I am running on Windows (98) with version ActiveTcl8.4.1.0-2-win32-ix86.exe [email protected] - foundin initialized to: "obsolete: 8.4.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "Bad exec behaviour at Tcl 8.4.1"
- type initialized to: "Bug"
Ticket change [c921894926] (rid 122229) by dkf on 2003-01-23 16:28:12:
- assignee changed to: "davygrvy"
- subsystem changed to: "27. Channel Types"
Ticket change [5106a66620] (rid 126065) by softmick on 2003-01-24 00:26:28:
- icomment:
Logged In: YES user_id=695046 I am advised that this problem (new at 8.4) could be a consequence of fixing a previous exec bug: 554068
- login: "softmick"
- mimetype: "text/plain"
- username: "softmick"
- icomment:
Ticket change [b87a1917af] (rid 128972) by dgp on 2003-01-24 04:40:59:
- icomment:
Logged In: YES user_id=80530 Just curious whether this bug an Bug 554608 were reported for the same release of Windows?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [e91dfdc805] (rid 104757) by davygrvy on 2003-01-24 04:51:12:
- icomment:
Logged In: YES user_id=7549 That behavior can be removed by taking out the part where that is quoted. diff -c -r1.32 tclWinPipe.c *** tclWinPipe.c17 Dec 2002 02:47:39 -00001.32 --- tclWinPipe.c23 Jan 2003 21:43:15 -0000 *************** *** 1594,1604 **** Tcl_DStringAppend(&ds, "\\\"", 2); start = special + 1; } ! if (*special == '{') { Tcl_DStringAppend(&ds, start, special - start); Tcl_DStringAppend(&ds, "\\{", 2); start = special + 1; ! } if (*special == '\0') { break; } --- 1594,1604 ---- Tcl_DStringAppend(&ds, "\\\"", 2); start = special + 1; } ! /* if (*special == '{') { Tcl_DStringAppend(&ds, start, special - start); Tcl_DStringAppend(&ds, "\\{", 2); start = special + 1; ! }*/ if (*special == '\0') { break; } What's interesting is that this is now showing itself. There are a set of rules this quoting mechanism needs to do so args can be pulled back out of the single string and placed in an argv array by the process that this line is handed. - login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [067a80adb3] (rid 89234) by davygrvy on 2003-01-24 05:30:28:
- icomment:
Logged In: YES user_id=7549 There is a double-quote problem in the current behavior of BuildCommandLine(). Somehow this was recently broken. if the commandline is this to CreateProcess(): a.exe b c=""d"" _SHOULD_ expand to an argv array of argv[0] = a.exe argv[1] = b argv[2] = c="d" if the commandline is this to CreateProcess(): a.exe b "c = d" _SHOULD_ expand to an argv array of argv[0] = a.exe argv[1] = b argv[2] = c = d GetCommandLine()->argv processing is done by the C- runtime of the process launched. It is out of Tcl's control. If some processes follow the quoting rules and others do not... then we're fighting a losing battle.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [baddcd66df] (rid 129390) by davygrvy on 2003-01-24 05:33:58:
- icomment:
Logged In: YES user_id=7549 % exec $env(COMSPEC) /c echo asd a="b" asd a=\"b\" The above should NOT be doing what you see. BuildCommandLine() MUST turn those quotes into two and NOT place a backslash in front of it.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [8257b3a5a2] (rid 117223) by softmick on 2003-01-24 06:07:22:
- icomment:
Logged In: YES user_id=695046 I do not quite understand the comments here, but I wonder if it is helpful to add thaat if I call a second Tcl script from a first script with arguments the problem is apparent. That is, the second script will get aruments with extra back- slash characters in it: e.g. exec wish printargs.tcl -- {3 and 4} So Tcl/Tk is not internally consistent. I hope this helps. Mick - login: "softmick"
- mimetype: "text/plain"
- username: "softmick"
- icomment:
Ticket change [fd67fc4e06] (rid 108409) by davygrvy on 2003-01-24 06:12:38:
- icomment:
Logged In: YES user_id=7549 Yes, Tcl must be internally consistent, but it must go EXTERNAL to do it according to the quoting rules that the C- runtime uses. The rules for turning a commandline string into a vector is contained by parse_cmdline() found in the MS runtime src\crt\stdargv.c BuildCommandLine in tclWinPipe.c must be the inverse of the runtime's parse_cmdline(). This is the problem here.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [e69bd64e35] (rid 104319) by davygrvy on 2003-01-24 06:25:12:
- icomment:
Logged In: YES user_id=7549 The problem is compounded by the fact that tclsh (in win/tclAppInit.c) uses a custom argv setting routine that is not the default of the runtime. We may fix Tcl to itself, but then calls to others apps will not be correct which tends to show itself when launching cygwin utilities which probably use a whole different rule set anyways.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [c38d4aa983] (rid 111681) by davygrvy on 2003-01-24 06:29:55:
- icomment:
Logged In: YES user_id=7549 Ok, first job is to make BuildCommandLine() exportable to the private Stubs table so I can put it in a test suite. Then we can compare it against the runtime's parse_cmdline () and against the custom one of win/tclAppInit.c and get this matter squashed.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [fd43e78c3a] (rid 108385) by softmick on 2003-01-24 14:36:26:
- icomment:
Logged In: YES user_id=695046 David The Tcl/Tk community is so very helpful. Thank you so much for looking at my problem with such enthusiasm and skill! I hopebody minds me putting this personal comment here for the record. Mick
- login: "softmick"
- mimetype: "text/plain"
- username: "softmick"
- icomment:
Ticket change [2723cd567a] (rid 88470) by vincentdarley on 2003-01-24 15:41:01:
- icomment:
Logged In: YES user_id=32170 As dgp asked, the original problem was on Win2000. I don't know if behaviour is different across different Win systems. Also, as Dave points out, cygwin may do something completely different -- if so, then cygwin is at fault, I think -- we should fix for the standard Win shell. Anyway, I'm happy to test any proposed fixes, and we obviously need to add appropriate tests to the test suite as well.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [dc1d3a909f] (rid 108077) by softmick on 2003-01-24 22:34:21:
- icomment:
Logged In: YES user_id=695046 When I found the problem, I was sending arguments from one Tcl/Tk script to another. In trying to understand the problem, I simplified it to running echo (from cygwin) from the wish shell by hand. It looks to me like cygwin reads the arguments exactly the same way the Tcl/Tk does now. I am assuming that the problem is with sending the arguments rather than reading them - hence your error going via $env(COMSPEC). Therefore, I am hopeful that cygwin interfaces will prove OK. I am unable to compile, but other than that, I am happy to help test. [email protected]
- login: "softmick"
- mimetype: "text/plain"
- username: "softmick"
- icomment:
Ticket change [a7a5a84d3d] (rid 98843) by hobbs on 2003-05-11 07:15:09:
- priority changed to: "7 High"
Ticket change [16bbbc53ac] (rid 124759) by davygrvy on 2003-12-16 17:06:56:
- icomment:
File Added - 70719: patch.txt Logged In: YES user_id=7549 Here's a patch that fixes this. It needs some more work to polish it.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [fbf8762912] (rid 108151) by davygrvy on 2004-01-29 04:28:41:
- icomment:
File Added - 75040: patch.txt Logged In: YES user_id=7549 Updated patch.. Needs test suite additions or, rather, verification with cases.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Add attachment "patch.txt" [2185f73161] (rid 130600) by davygrvy on 2004-01-29 04:28:41.
Ticket change [8e0c914d79] (rid 120052) by davygrvy on 2004-01-29 04:28:42:
- icomment:
File Deleted - 70719:
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [2104f7d927] (rid 130512) by davygrvy on 2004-02-01 16:29:12:
- closedate changed to: "2004-02-01T09:29:12"
- closer changed to: "davygrvy"
- icomment:
Logged In: YES user_id=7549 Committing fix to HEAD. tclWinPipe.c -r1.41
- login: "davygrvy"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "davygrvy"
Ticket change [7a96073f49] (rid 90353) by davygrvy on 2004-02-01 18:27:00:
- icomment:
Logged In: YES user_id=7549 FYI, no test case existed to show the need for the custom setargv() used in both the tcl and wish shells. Therefore, it was removed in favor of the c-runtime's work.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [1dd6cf35fe] (rid 90881) by dgp on 2004-02-03 01:11:27:
- icomment:
Logged In: YES user_id=80530 What does this change do to Tcl Bug 554068?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment: