Get the user and group ID attributes from a spawn attributes object
#include <spawn.h> int posix_spawnattr_getcred( const posix_spawnattr_t *_Restrict attrp, uid_t *_Restrict uid_p, gid_t *_Restrict gid_p);
- A pointer to the spawn attributes object that you want to query.
- A pointer to a location where the routine can store the current user ID attibute.
- A pointer to a location where the routine can store the current group ID attibute.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The posix_spawnattr_getcred() function retrieves the current values of the credential attributes (user and group IDs) from the spawn attribute object pointed to by attrp, and stores them in the locations pointed to by uid_p and gid_p. You must have already initialized the spawn attributes object by calling posix_spawnattr_init().
These attributes are used as the user and group IDs of the child process created by a spawn operation if POSIX_SPAWN_SETCRED is set in the spawn flags; to set this flag, call posix_spawnattr_setxflags().
To set the value of these attributes, call posix_spawnattr_setcred().
For more information about spawn attributes, see the entry for posix_spawn().
This function is a BlackBerry 10 OS extension.
- An argument was invalid.
Last modified: 2014-06-24