setprid(2) setprid(2) NAME setprid - set project ID SYNOPSIS #include <sys/types.h> #include <unistd.h> int setprid(prid_t prid); DESCRIPTION The setprid function changes the project ID for the array session containing the current process to the value specified by prid. Ordinarily, the project ID for a new array session is inherited from the array session of the process that created it. However, when the array session is created as part of a new login (or moral equivalent, such as a batch job or rsh(1)), it may be appropriate to assign a new project ID, such as a default project ID associated with the user that is logging in. The setprid function can be used to accomplish this. The new project ID must be a positive value. The process invoking setprid must have superuser privileges. For more information on projects and project IDs, see projects(5). ERRORS setprid may fail if one or more of these conditions are true: EINVAL prid is negative EPERM The current process does not have superuser privileges. SEE ALSO getprid(2), newarraysess(2), array_sessions(5), projects(5). DIAGNOSTICS Upon successful completion, setprid returns a value of 0. Otherwise, a value of -1 is returned and errno is set to indicate the error. Page 1