manpages.info - online man pages   

SunOS man pages : getprojid (2)

System Calls                                         settaskid(2)

NAME

settaskid, gettaskid, getprojid - set or get task or project IDs

SYNOPSIS

#include <sys/types.h> #include <sys/task.h> #include <unistd.h> taskid_t settaskid(projid_t project, int flags); taskid_t gettaskid(void); projid_t getprojid(void);

DESCRIPTION

The settaskid() function makes a request of the system to assign a new task ID to the calling process, changing the associated project ID to that specified. The calling pro- cess must have superuser privileges to perform this opera- tion. The flags argument should be either TASK_NORMAL for a regular task, or TASK_FINAL, which disallows subsequent set- taskid() calls by the created task. The gettaskid() function returns the task ID of the calling process. The getprojid() function returns the project ID of the cal- ling process.

RETURN VALUES

Upon successful completion, these functions return the appropriate task or project ID. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

The settaskid() function will fail if: EACCES The invoking task was created with the TASK_FINAL flag. EPERM The effective user of the calling process is not superuser. EINVAL The given project ID is not within the valid project ID range.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes: SunOS 5.8 Last change: 11 Jan 2000 1 System Calls settaskid(2) ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | MT-Level | Async-Signal-Safe | |_____________________________|_____________________________|

SEE ALSO

setsid(2), project(4), attributes(5) SunOS 5.8 Last change: 11 Jan 2000 2