Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

task(3perl) [opensolaris man page]

Task(3PERL)						      Perl Library Functions						       Task(3PERL)

NAME
Task - Perl interface to Tasks SYNOPSIS
use Sun::Solaris::Task qw(:ALL); my $taskid = gettaskid(); DESCRIPTION
This module provides wrappers for the gettaskid(2) and settaskid(2) system calls. Constants TASK_NORMAL, TASK_FINAL. Functions settaskid($project, $flags) The $project parameter must be a valid project ID and the $flags parameter must be TASK_NORMAL or TASK_FINAL. The parameters are passed through directly to the underlying settaskid() system call. The new task ID is returned if the call succeeds. On failure -1 is returned. gettaskid() This function returns the numeric task ID of the calling process, or undef if the underlying gettaskid() system call is unsuccessful. Class methods None. Object methods None. Exports By default nothing is exported from this module. The following tags can be used to selectively import constants and functions defined in this module: :SYSCALLS settaskid() and gettaskid() :CONSTANTS TASK_NORMAL and TASK_FINAL :ALL :SYSCALLS and :CONSTANTS ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWpl5u | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
gettaskid(2), settaskid(2), attributes(5) SunOS 5.11 1 Dec 2002 Task(3PERL)

Check Out this Related Man Page

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, int 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 settaskid() 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 indi- cate 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 or LWPs in the current project or zone has been 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(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ SEE ALSO
setsid(2), project(4), attributes(5), privileges(5) SunOS 5.10 28 Jun 2004 settaskid(2)
Man Page