ARSperl Manual - ars_ExecuteProcess

# ARS 3.x and Higher

## `ars_ExecuteProcess(ctrl, command, runOption=0)`

Execute the given command on the server host as the user-id that the server process is running as. Requires Administrator privs to use.

`runOption` | Explanation
0 | Wait for process to complete and then returned the process' returnStatus and any output that the process had.
1 | Don't wait for process to complete.

On success
  Depending upon the runOption specified returns a list of `returnStatus` and `returnString` or 1
On failure
  Returns undef.

Example:

    	(($returnCode, $returnString) = ars_ExecuteProcess($ctrl, "/bin/ls -l /")) ||
    		die "$ars_errstr";

ars_ExecuteProcess was introduced in version 1.5 of ARSperl.

Table of Contents