POSIX::1003::Proc - POSIX handling processes
POSIX::1003::Proc is a POSIX::1003::Module
use POSIX::1003::Proc qw/abort setpgid/; abort(); setpgid($pid, $pgid);
Functions which are bound to each separate process.
See documentation in the base class.
See "METHODS" in POSIX::1003::Module
Abnormal process exit.
These functions have captial names because in C they are implemented as macro's (which are capitalized by convension)
Returns the normal exit status of the child process. Only meaningful if WIFEXITED($?) is true.
WIFEXITED($?)
Returns true if the child process exited normally: "exit()" or by falling off the end of "main()".
Returns true if the child process terminated because of a signal.
Returns true if the child process is currently stopped. Can happen only if you specified the WUNTRACED flag to waitpid().
WUNTRACED
Returns the signal the child process was stopped for. Only meaningful if WIFSTOPPED($?) is true.
WIFSTOPPED($?)
Returns the signal the child process terminated for. Only meaningful if WIFSIGNALED($?) is true.
WIFSIGNALED($?)
Simply "wait" in perlfunc.
Simply "waitpid" in perlfunc.
Leave the program without calling handlers registered with atexit (which is not available in Perl)
atexit
Generates the path name for the controlling terminal of this process. my $path = ctermid();
Get the login name of the effective user of the current process. See also perldoc -f getlogin my $name = cuserid();
perldoc -f getlogin
Returns the name of the current working directory. See also Cwd.
use POSIX::1003::Proc 'nice'; $new_prio = nice($increment);
The CORE times() function returns four values, conveniently converted into seconds (float). The POSIX times() returns five values in clock tics. To disambique those two, we offer the POSIX function under a slightly different name.
times()
Be warned that the clock ticks will overflow which the count of clock tics does not fit in a clock_t type anymore. That will happen in 49.7 days, when a tick is a millisecond and clock_t an uint32.
clock_t
($user, $sys, $cuser, $csys) = CORE::times(); ($elapse, $user, $sys, $cuser, $csys) = POSIX::times(); ($elapse, $user, $sys, $cuser, $csys) = times5();
EXIT_FAILURE EXIT_SUCCESS
CHILD_MAX
This module is part of POSIX-1003 distribution version 0.98, built on December 03, 2013. Website: http://perl.overmeer.net. The code is based on POSIX, which is released with Perl itself. See also POSIX::Util for additional functionality.
Copyrights 2011-2013 on the perl code and the related documentation by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
To install POSIX::1003, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POSIX::1003
CPAN shell
perl -MCPAN -e shell install POSIX::1003
For more information on module installation, please visit the detailed CPAN module installation guide.