introspection_get_proc_info()
Get information about a process
Synopsis:
#include <sys/introspection.h>
int introspection_get_proc_info( pid64_t pid64,
debug_process_t *info );
Arguments:
- pid64
- The PID (pid_t) or unique PID (pid64_t) of the target process.
- info
- The location to store the data.
Library:
libintrospection
Use the -l introspection option to qcc to link against this library.
Description:
The introspection_get_proc_info() function gets and stores the
following information about a process into the provided buffer:
- The 32-bit PID of the process
- The 32-bit parent PID of the process
- Process flags
- Umask
- Process group ID
- Session ID
- Base address (address of the ELF header)
- Initial stack address
- User ID
- Group ID
- Effective user ID
- Effective group ID
- Set user ID
- Set group ID
- Ignored signals mask
- Queued signals mask
- Pending signals
- Number of threads
- Number of timers
- Start time in nanoseconds
- User running time in nanoseconds
- System running time in nanoseconds
- Terminated children user time in nanoseconds
- Process base priority
- Critical process
- Address of process local storage
- Address of process signal trampoline
- Address of process thread cancellation trampoline
- Amount of MAP_PRIVATE memory
- Application ID
- Security type ID
- Soft limit for core creation
Note:
Your process must have the
PROCMGR_AID_XPROCESS_QUERY ability enabled to request information
about another process.
Returns:
EOK on success. If an error occurs, the function returns a value from the Errors section.
Errors:
- EFAULT
- Error accessing the output buffer.
- EPERM
- The calling process doesn't have the required ability.
- ESRCH
- The PID is invalid.
Classification:
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Signal handler | Yes |
| Thread | Yes |
Page updated:
