Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

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

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. 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.
    
  4. foundin changed to: "obsolete: 8.0p2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "60. NRE and coroutines"
  10. title changed to: "cannot pass null arguments to exec or open"
  11. type changed to: "Bug"