cpusetGetUnixPerm(3x)
cpusetGetUnixPerm - get the Unix file permissions for a cpuset
As shipped in IRIX 6.5.30. Added in IRIX 6.5.22.
NAME cpusetGetUnixPerm - get the Unix file permissions for a cpuset SYNOPSIS #include <cpuset.h> int cpusetGetUnixPerm(char *qname, uid_t *owner, gid_t *group, mode_t *mode); DESCRIPTION The cpusetGetUnixPerm function is used to obtain the standard Unix file permissions of a cpuset. The permissions for a file that was specified at cpuset creation time are used as the access permissions for the cpuset. The user and group that owns the cpuset is the user and group that owns the file used to specify the access permissions. The user ID of the owner is returned in the memory location referenced by the owner argument. The group ID of the group owner is returned in the memory location referenced by the group argument. The mode of the access permissions is returned in the memory location referenced by the mode argument. The qname argument is the name of the specified cpuset. The function returns a status to indicate success of failure. EXAMPLES This example obtains the list of CPUs asigned to the cpuset mpi_set and prints out the CPU ID values. char *qname = "mpi_set"; uid_t owner = 0; gid_t group = 0; mod_t mode = 0; /* Get the Unix file permission for the cpuset */ if (!cpusetGetUnixPerm(qname, &owner, &group, &mode)) { perror("cpusetGetUnixPerm"); exit(1); } printf("Owner ID: %d0, ACL_to_str(acc)); printf("Group ID: %d0, ACL_to_str(def)); printf("Permissions: %s0, mode_to_text(mode); NOTES cpusetGetUnixPerm is found in the library "libcpuset.so", and will be loaded if the option -lcpuset is used with cc(1) or ld(1). SEE ALSO cpuset(1), cpusetSetUnixPerm(3x), cpuset(5). DIAGNOSTICS If successful, cpusetGetUnixPerm returns 1. If cpusetGetUnixPerm fails, it returns 0 and errno is set to indicate the error. The possible values for errno include those values as set by sysmp(2) and sbrk(2).