proc_exists()
Verify that a process exists.
Syntax
proc_exists(pid)
Parameter
Parameter | Definition |
---|---|
pid | process identifier number of the process whose existence is being verified |
Description
The proc_exists() function returns TRUE if the process with process identifier pid exists, FALSE if it does not.
Example
The following example uses the proc_exists() function to verify that a process with a specific process ID exists:
if (proc_exists(1)) {
print("A process with PID 1 is running\n");
}
print("A process with PID 1 is running\n");
}