getprojid(2) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

getprojid(2)

settaskid(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, uint_t flags);


       taskid_t gettaskid(void);


       #include <sys/types.h>
       #include <sys/task.h>
       #include <unistd.h>
       #include <project.h>

       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 process must have sufficient privileges to
       perform this operation. 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 calling 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.


       EAGAIN    A resource control limiting the number  of  tasks,  LWPs,  or
                 processes in the current project or zone has been exceeded.

                 A resource control on the given project would be exceeded.


       EINVAL    The  given  project  ID  is  not  within the valid project ID
                 range.


       EPERM     The {PRIV_PROC_TASKID}  privilege  is  not  asserted  in  the
                 effective set of the calling process.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ MT-LevelAsync-Signal-Safe


SEE ALSO
       setsid(2), project(5), attributes(7), privileges(7)



Oracle Solaris 11.4               6 Dec 2013                      settaskid(2)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3