# # Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. # # # Sun::Solaris::Project documentation. # =head1 NAME Sun::Solaris::Project - Perl interface to Projects =head1 SYNOPSIS use Sun::Solaris::Project qw(:ALL); my $projid = getprojid(); This module provides wrappers for the Project-related system calls and the C library. Also provided are constants from the various Project-related headers. =head2 Constants C, C< PROJNAME_MAX>, C, C, C, and C. =head2 Functions B> This function returns the numeric project ID of the calling process or C if the underlying C system call is unsuccessful. B> If C<$user> is a member of the project specified by C<$project>, C creates a new task and associates the appropriate resource controls with the process, task, and project. This function returns 0 on success. If the the underlying task creation fails, C is returned. If pool assignment fails, C is returned. If any resource attribute assignments fail, an integer value corresponding to the offset of the failed attribute assignment in the project database is returned. See C. B> This function returns a list of the currently active projects on the system. Each value in the list is the numeric ID of a currently active project. B> This function returns the next entry from the project database. When called in a scalar context, C returns only the name of the project. When called in a list context, C returns a 6-element list consisting of: ($name, $projid, $comment, \@users, \@groups, $attr) C<\@users> and C<\@groups> are returned as arrays containing the appropriate user or project lists. On end-of-file C is returned. B> This function rewinds the project database to the beginning of the file. B> This function closes the project database. B> This function searches the project database for an entry with the specified name. It returns a 6-element list as returned by C if the entry is found and C if it cannot be found. B> This function searches the project database for an entry with the specified ID. It returns a 6-element list as returned by C if the entry is found or C if it cannot be found. B> This function returns the default project entry for the specified user in the same format as C. It returns C if the user cannot be found. See C for information about the lookup process. B> This function returns the next project entry from C<$filehandle>, a Perl file handle that must refer to a previously opened file in C format. Return values are the same as for C. B> This function checks whether the specified user is able to use the project. This function returns C if the user can use the project and C otherwise. See C. B> This function searches the project database for the specified project. It returns the project ID if the project is found and C if it is not found. =head2 Class methods None. =head2 Object methods None. =head2 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 getprojid() :LIBCALLS setproject(), activeprojects(), getprojent(), setprojent(), endprojent(), getprojbyname(), getprojbyid(), getdefaultproj(), fgetprojent(), inproj(), and getprojidbyname() :CONSTANTS MAXPROJID, PROJNAME_MAX, PROJF_PATH, PROJECT_BUFSZ, SETPROJ_ERR_TASK, and SETPROJ_ERR_POOL :ALL :SYSCALLS, :LIBCALLS, and :CONSTANTS =head1 ATTRIBUTES See C for descriptions of the following attributes: ___________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | CPAN (http://www.cpan.org) | |_____________________________|_____________________________| | Interface Stability | Evolving | |_____________________________|_____________________________| =head1 SEE ALSO C, C, C, C, C, C, C