status = exec ( command ) ;
str command
- The command to execute.
list status
- $ACKNOWLEDGE
The command was executed.
The STATUS variable is set to $ACKNOWLEDGE
%ARGUMENT : Invalid arguments. Usage: status = exec ( command ) ;
%IO : Command string to long.
In both UNIX and VMS systems, the system() function calls the system() 'C' run-time library function. Unless you require a result back from the command, it is preferable to use the system() function. The exec() command, on the other hand, is much more complex in the UNIX environment. In the VMS environment, system() and exec() and equivalent. In UNIX, the exec() command results in a fork'ed process with stdout redirected to with the resulting internal command: execl ( "/bin/sh", "sh", "-c", command, (char *) 0 ) ; Also, the exec() function in the UNIX environment returns the last line of stdout. If there is not output, the return value is 0.
None