proc_getpid()

Get PID by name

Syntax:

int proc_getpid(char *exe);

Arguments:

no arguments

Description:

Get PID of a process (with name equal "exe"). If there are some PIDs for one executable name, the function returns the PID of the last process created.

Return Values:

On success, returns the PID of process exe. On error, -1 is returned.

Author:

Added by Tiago Scheid <scheid(at)inf.ufsm.br>

See Also:

proc_pid_exists(), proc_exe_name_pid(), proc_username_pid(), proc_exe_pid() proc_cmdline_pid()



INDEX