Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-12846

Std.System.Util.CmdProcess() does not process arguments to command

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Not specified
    • Resolution: Fixed
    • 5.0.2, 4.2.12
    • 5.2.0
    • JLib
    • Tested on only the two versions cited.

    Description

      Given this:

      IMPORT lib_fileservices;
      
      Std.System.Util.CmdProcess('uname -a', '');
      

      The result is an empty string due to an underlying failure. Using only 'uname' as the argument returns "Linux".

      It appears that the source of the problem is in jlib/jutil.cpp within the callExternalProgram() function. The execle()/execlp() calls pass the entire program name ("uname -a") to the system calls rather than parsing things out. execvpe()/execvp() may be better choices, with the arguments parsed out and passed as an array of C-style strings.

      I could be very wrong about the source of the problem, but the bug does exist.

      Attachments

        Activity

          People

            richardkchapman Richard Chapman
            dcamper Dan S. Camper
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: