Skip to content
Tcl Source Code History Of Ticket 432499
Login

History Of Ticket 432499

Artifacts Associated With Ticket 432499

  1. Ticket change [7874fefd2a] (rid 89966) by kenpoole on 2001-06-12 18:47:30:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      If I pass the fully qualified path to an executable that has spaces in its path to the exec command, it will execute properly.  If I pass just the command name, it will error out with "invalid argument" as the error message.  
      
      If I modify the source in tclWinPipe.c (starting at line 1525 from the packaged 8.3.3 tar ball) as follows:
      
      #define KEP_EXEC_PROBLEM
      #ifdef KEP_EXEC_PROBLEM
      if (arg[0] == '\0') {
      #else
      if (argv[i][0] == '\0') {
      #endif
          quote = 1;
      } else {
      #ifdef KEP_EXEC_PROBLEM
          for (start = arg; *start != '\0'; start++) {
      #else
          for (start = argv[i]; *start != '\0'; start++) {
      #endif
      
      the exec works as I expect.  The second set of changes is what actually fixes my problem (start=arg).  If the fully qualified path is specified, the argv[0] and arg contain identical strings.  if invoked as:
      exec application
      the var argv[0] will contain "application", arg will contain the fully qualified path (ie c:\Program Files\appdir\application.exe).  Since the code that checks for "quoting" was looking at argv[0], it wasnt seeing the "space" in the fully qualified path and the command to actually launch the app would fail.
      
      
    4. foundin initialized to: "obsolete: 8.3.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "kenpoole"
    9. subsystem initialized to: "16. Commands A-H"
    10. title initialized to: "command string passed to exec not quoted"
    11. type initialized to: "Bug"
  2. Ticket change [d48228def5] (rid 123453) by dkf on 2001-06-13 15:23:12:

    1. subsystem changed to: "27. Channel Types"
  3. Ticket change [c6ced8b2e8] (rid 121831) by andreas_kupries on 2001-08-23 05:54:34:

    1. assignee changed to: "andreas_kupries"
  4. Add attachment "demo432499.tcl" [faef4bed2f] (rid 91973) by andreas_kupries on 2001-08-24 02:37:46.

  5. Ticket change [8340fca71d] (rid 117360) by andreas_kupries on 2001-08-24 02:37:46:

    1. icomment:
      
      
      File Added - 9907: demo432499.tcl
      
      Logged In: YES 
      user_id=75003
      
      The above description is a bit confusing.
      
      Does the problem occur when KEP_EXEC_PROBLEM
      is defined or when it is not defined ?
      
      What would be a nice example application I could use ?
      (Something which is hopefully everywhere where we have
      Windows)
      
      Attaching a demo script which uses our local 'perforce'
      client (p4.exe) as the application to run.
      _______________________________________
      >> I cannot verify the problem <<
      
      What is your operating system ?
      
      I use WinNT 5 and tried to verify this problem for tcl8.4a3
      I will try 8.3.3 now too.
      
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  6. Ticket change [85cb536e41] (rid 131379) by andreas_kupries on 2001-08-24 02:47:31:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      I am unable to verify this for 8.3.3 as well,
      using Windows NT 5.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  7. Ticket change [a45e52e271] (rid 110194) by kenpoole on 2001-08-24 02:58:23:

    1. icomment:
      Logged In: YES 
      user_id=68713
      
      The problem occurs when KEP_EXEC_PROBLEM is not defined. 
      Sorry about not being clearer ...  as to a sample program to
      run, I dont see anything that would be "on all windows
      systems" ... it needs to be an application which has a space
      somewhere in its path (like any application in "c:\Program
      Files\...") that is also in the "PATH" enviroment variable
      such that in a "dos" window (cmd.exe on nt) it can be run by
      just typing the program name (without typing the absolute
      path).  It (unfortunatly) seems to be machine specific ... I
      have two machines that show the problem here (both NT5), and
      some people around me dont see the problem ... I also sent
      the "modified" tcl83 exe to another of our sites since they
      were showing the same problem ... I dont know what the
      "differing" factor is between these boxes are ... 
      
      What I do know is that when I modified the function
      BuildCommandLine to include the argument "executable" in the
      check for quoting (which is the affect of the above code
      change), then the "executable" string is quoted and the
      application executes as expected ...
      
      
    2. login: "kenpoole"
    3. mimetype: "text/plain"
    4. username: "kenpoole"
  8. Ticket change [49bcf37ad0] (rid 100095) by andreas_kupries on 2001-08-24 03:00:32:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Looking deeper I see the same difference between 'arg' 
      and 'argv [i]' in the case of 'exec app' without full
      path. But it doesn't seem to matter anymore to the OS.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  9. Ticket change [b5431856c3] (rid 125212) by andreas_kupries on 2001-08-24 04:20:44:

    1. closedate changed to: "2001-08-23T21:20:44"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Patch accepted. It looks good (other parts of the
      code use 'arg' instead of 'argv[i]') and does not
      introduce new errors.
      
      Attaching final patch.
      Committed this patch to both core-8-3-1-branch (8.3.3)
      and the HEAD.
      
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "andreas_kupries"
  10. Add attachment "432499.diff" [d88096bed7] (rid 107448) by andreas_kupries on 2001-08-24 04:20:45.

  11. Ticket change [4116060fac] (rid 116121) by andreas_kupries on 2001-08-24 04:20:45:

    1. icomment:
      
      
      File Added - 9912: 432499.diff
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"