introspection_get_all_pids()
Get a list of PIDs and store them in a buffer
Synopsis:
#include <sys/introspection.h>
int introspection_get_all_pids( pid64_t * buffer,
size_t bsize );
Arguments:
- buffer
- The buffer to store the PIDs.
- bsize
- The size of the buffer.
Library:
libintrospection
Use the -l introspection option to qcc to link against this library.
Description:
The introspection_get_all_pids() function gets a list of PIDs of all processes and stores them in the buffer.
Returns:
The required number of bytes to store all PIDs, on success. The buffer is filled with as many complete PIDs that will fit. If an error occurs, the function returns the negative of a value from the Errors section.
Errors:
- EFAULT
- Error accessing the output buffer.
Classification:
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Signal handler | Yes |
| Thread | Yes |
Page updated:
