Overview
| Artifact ID: | 8cf1800a9cd1efeb76bb7913d66f5f5246462489 |
|---|---|
| Ticket: | 218446ffffffffffffffffffffffffffffffffff
cannot pass null arguments to exec or open |
| User & Date: | nobody on 2000-10-26 01:00:31 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 546 Bug Version: 8.0p2 SubmitDate: '1998-03-16' LastModified: '1998-06-15' Severity: MED Status: Released Submitter: stanton ChangedBy: stanton OS: All Windows OSVersion: NA Machine: NA FixedDate: '2000-10-25' FixedInVersion: 8.0.3 ClosedDate: '1998-06-15' From: Darrel Schneider <[email protected]> Subject: Tcl exec in Windows eats empty args Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-UIDL: 77562633d5c508c83d88d4ff483072da I found that I couldn't pass an empty arg to an execed program on Windows with tcl8.0p2. The fix goes in tclWinPipe.c BuildCommandLine. The old code was: for (start = argv[i]; *start != '\0'; start++) { if (isspace(*start)) { quote = 1; Tcl_DStringAppend(linePtr, "\"", 1); break; } } The new code is: quote = 0; if (argv[i][0] == '\0') { quote = 1; } else { for (start = argv[i]; *start != '\0'; start++) { if (isspace(*start)) { quote = 1; break; } } } if (quote) { Tcl_DStringAppend(linePtr, "\"", 1); } The patch is correct.
- foundin changed to: "obsolete: 8.0p2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "60. NRE and coroutines"
- title changed to: "cannot pass null arguments to exec or open"
- type changed to: "Bug"