SPVM-Sys
view release on metacpan or search on metacpan
lib/SPVM/Sys.pm view on Meta::CPAN
=head2 set_effective_group_id
C<static method set_effective_group_id : void ($effective_group_id : int);>
Sets the effective group ID of the current process.
This method calls L<Sys::User#getegid|SPVM::Sys::User/"getegid"> method given the argument given to this method.
Exceptions:
Exceptions thrown by L<Sys::User#getegid|SPVM::Sys::User/"getegid"> method could be thrown.
=head2 setpwent
C<static method setpwent : void ();>
Rewinds to the beginning of the password database.
=head2 endpwent
C<static method endpwent : void ();>
Closes the password database after all processing has been performed.
=head2 getpwent
C<static method getpwent : L<Sys::User::Passwd|SPVM::Sys::User::Passwd> ();>
Gets a next password entry.
=head2 setgrent
C<static method setgrent : void ();>
Rewinds to the beginning of the group database.
=head2 endgrent
C<static method endgrent : void ();>
Closes the group database after all processing has been performed.
=head2 getgrent
C<static method getgrent : L<Sys::User::Group|SPVM::Sys::User::Group> ();>
Gets a next group entry.
=head2 getgroups
C<static method getgroups : int[] ();>
Returns the supplementary group IDs of the calling process.
=head2 setgroups
C<static method setgroups : void ($group_ids : int[]);>
Sets the supplementary group IDs for the calling process.
=head2 getpwuid
C<static method getpwuid : L<Sys::User::Passwd|SPVM::Sys::User::Passwd> ($id : int);>
Searches a password entry given The user ID $id. If found, returns the password entry, otherwise return undef.
=head2 getpwnam
C<static method getpwnam : L<Sys::User::Passwd|SPVM::Sys::User::Passwd> ($name : string);>
Searches a password entry given The user name $name. If found, returns the password entry, otherwise return undef.
=head2 getgrgid
C<static method getgrgid : L<Sys::User::Group|SPVM::Sys::User::Group> ($id : int);>
Searches a group entry given The group ID $id. If found, returns the group entry, otherwise return undef.
=head2 getgrnam
C<static method getgrnam : L<Sys::User::Group|SPVM::Sys::User::Group> ($name : string);>
Searches a group entry given The group name $name. If found, returns the group entry, otherwise return undef.
=head2 srand
C<static method srand : void ($seed : int);>
Sets the random number $seed for L</"rand"> method.
Implementation:
Calls L<Fn#set_seed|SPVM::Fn/"set_seed"> method given $seed.
=head2 rand
C<static method rand : double ($max : int = 1);>
Returns a random fractional number greater than or equal to 0 and less than $max.
If you change the random seed, you can use L</"srand"> method.
Implementation:
If C<seed> stack variable is initialized, the random seed is got from the variable.
Otherwise the random seed is created from the process ID and epoch time.
And calls L<Fn#rand|SPVM::Fn/"rand"> method given the reference of the seed, $max.
And calls L</"srand"> method given the returned seed to update C<seed> stack variable.
Exceptions:
Exceptions thrown by L<Fn#rand|SPVM::Fn/"rand"> method could be thrown.
=head1 Modules
=over 2
=item * L<Sys::Env|SPVM::Sys::Env>
=item * L<Sys::IO|SPVM::Sys::IO>
( run in 1.113 second using v1.01-cache-2.11-cpan-df04353d9ac )