_NutQueryProcessName()

return full path of program running as specified process ID 

Function


SYNOPSIS

#include <nutc.h>

char *_NutQueryProcessName(pid_t __pid);


DESCRIPTION

The _NutQueryProcessName() function returns the full path of the program running as pid. To retrieve the full path of the currently running process, make the following call:

our_process_path = NutQueryProcessName(getpid());

_NutQueryProcessName() returns null if the name of the task could not be determined. In this case, _NutQueryProcessName() does not set ERRNO; but you can assume that the current task does not have sufficient privileges to glean this information.


PARAMETERS

pid 

Specifies a running process.


RETURN VALUES

If successful, _NutGetProcessName() returns a pointer to the full path. If the name of the task could not be determined, it returns NULL and you can assume that the current task does not have sufficient privileges to get this information.


CONFORMANCE

PTC MKS Toolkit UNIX APIs extension.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.4 Documentation Build 39.