Details
-
Bug
-
Status: Resolved
-
Not specified
-
Resolution: Fixed
-
5.0.2, 4.2.12
-
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.