#include <nutc.h>
char *_NutQueryProcessName(pid_t __pid);
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.
- pid
-
Specifies a running process.
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.
MKS Toolkit UNIX APIs extension.
MT-Safe.
None.
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
MKS Toolkit 9.3 Documentation Build 6.