AG_ProcessID AG_Execute (const char *file, char **argv)
AG_ProcessID AG_WaitOnProcess (AG_ProcessID pid, enum ag_exec_wait_type wait_type)
int AG_Kill (AG_ProcessID pid)
|
The
AG_Execute() function executes the specified file with the given arguments, returning an
integer process ID.
If an error has occurred, the function returns -1 with an error message.
AG_WaitOnProcess() checks for status or waits until the specified process terminates.
The
wait_type argument may be one of:
AG_EXEC_WAIT_IMMEDIATE | If the process has not exited, return immediately without blocking.
| AG_EXEC_WAIT_INFINITE | Block the calling thread until the process has exited.
|
The function returns the PID of the terminated process, -1 if an error
has occurred, or 0 if
wait_type is
AG_EXEC_WAIT_IMMEDIATE and the process is still running.
The
AG_Kill() function immediately terminates the specified process.
|