MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


System Calls                                         settaskid(2)



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

SYNOPSIS
     #include 
     #include 
     #include 

     taskidt settaskid(projidt project, int flags);


     taskidt gettaskid(void);


     #include 
     #include 
     #include 
     #include 

     projidt 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 TASKNORMAL for a  regu-
     lar  task,  or  TASKFINAL,  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.

ERORS
     The settaskid() function will fail if:

     EACES    The invoking task was created with the  TASKFINAL
               flag.





SunOS 5.11          Last change: 10 Apr 2007                    1






System Calls                                         settaskid(2)



     EAGAIN    A resource control limiting the number of tasks or
               LWPs  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  pro-
               ject ID range.


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


ATRIBUTES
     See attributes(5)  for descriptions of the following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     Async-Signal-Safe           
    


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
























SunOS 5.11          Last change: 10 Apr 2007                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™