1# 2# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 3# Use is subject to license terms. 4# 5# CDDL HEADER START 6# 7# The contents of this file are subject to the terms of the 8# Common Development and Distribution License, Version 1.0 only 9# (the "License"). You may not use this file except in compliance 10# with the License. 11# 12# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 13# or http://www.opensolaris.org/os/licensing. 14# See the License for the specific language governing permissions 15# and limitations under the License. 16# 17# When distributing Covered Code, include this CDDL HEADER in each 18# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 19# If applicable, add the following below this CDDL HEADER, with the 20# fields enclosed by brackets "[]" replaced with your own identifying 21# information: Portions Copyright [yyyy] [name of copyright owner] 22# 23# CDDL HEADER END 24# 25#ident "%Z%%M% %I% %E% SMI" 26# 27# Sun::Solaris::Task documentation. 28# 29 30=head1 NAME 31 32Sun::Solaris::Task - Perl interface to Tasks 33 34=head1 SYNOPSIS 35 36 use Sun::Solaris::Task qw(:ALL); 37 my $taskid = gettaskid(); 38 39This module provides wrappers for the C<gettaskid(2)> and C<settaskid(2)> 40system calls. 41 42=head2 Constants 43 44C<TASK_NORMAL>, C<TASK_FINAL>. 45 46=head2 Functions 47 48B<C<settaskid($project, $flags)>> 49 50The C<$project> parameter must be a valid project ID and the C<$flags> 51parameter must be C<TASK_NORMAL> or C<TASK_FINAL>. The parameters are passed 52through directly to the underlying C<settaskid()> system call. The new task ID 53is returned if the call succeeds. On failure -1 is returned. 54 55C<gettaskid()> 56 57This function returns the numeric task ID of the calling process, or C<undef> 58if the underlying C<gettaskid()> system call is unsuccessful. 59 60=head2 Class methods 61 62None. 63 64=head2 Object methods 65 66None. 67 68=head2 Exports 69 70By default nothing is exported from this module. The following tags can be 71used to selectively import constants and functions defined in this module: 72 73 :SYSCALLS settaskid() and gettaskid() 74 75 :CONSTANTS TASK_NORMAL and TASK_FINAL 76 77 :ALL :SYSCALLS and :CONSTANTS 78 79=head1 ATTRIBUTES 80 81See C<attributes(5)> for descriptions of the following attributes: 82 83 ___________________________________________________________ 84 | ATTRIBUTE TYPE | ATTRIBUTE VALUE | 85 |_____________________________|_____________________________| 86 | Availability | CPAN (http://www.cpan.org) | 87 |_____________________________|_____________________________| 88 | Interface Stability | Evolving | 89 |_____________________________|_____________________________| 90 91=head1 SEE ALSO 92 93C<gettaskid(2)>, C<settaskid(2)>, C<attributes(5)> 94