use POSIX; # import all symbols use POSIX qw(setsid); # import one symbol use POSIX qw(:errno_h :fcntl_h); # import sets of symbols printf "EINTR is %d\n", EINTR; $sess_id = POSIX::setsid(); $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644); # note: $fd is a filedescriptor, *NOT* a filehandle
The POSIX module permits you to access all (or nearly all) the standard POSIX 1003.1 identifiers. Many of these identifiers have been given Perl-ish interfaces.
This description gives a condensed list of the features available in the POSIX module. Consult your operating system's manpages for general information on most features. Consult the appropriate Perl built-in function whenever a POSIX routine is noted as being identical to the function.
The "Classes" section later in this chapter describes some classes for signal objects, TTY objects, and other miscellaneous objects. The "Functions" section later in this chapter describes POSIX functions from the 1003.1 specification. The remaining sections list various constants and macros in an organization that roughly follows IEEE Std 1003.1b-1993.
WARNING: A few functions are not implemented because they are C-specific.[ 12 ] If you attempt to call one of these functions, it will print a message telling you that it isn't implemented, and will suggest using the Perl equivalent, should one exist. For example, trying to access the
setjmp()
call will elicit the message: "setjmp() is C-specific: use eval {} instead
".[12] The 1003.1 standard wisely recommends that other language bindings should avoid duplicating the idiosyncracies of C. This is something we were glad to comply with.
Furthermore, some vendors will claim 1003.1 compliance without passing the POSIX Compliance Test Suites (PCTS). For example, one vendor may not define
EDEADLK
, or may incorrectly define the semantics of the errno values set by open (2). Perl does not attempt to verify POSIX compliance. That means you can currently say "use POSIX
" successfully, and then later in your program find that your vendor has been lax and there's no usableICANON
macro after all. This could be construed to be a bug. Whose bug, we won't venture to guess.
POSIX::SigAction
new
Creates a new POSIX::SigAction object that corresponds to the C
struct sigaction
. This object will be destroyed automatically when it is no longer needed. The first parameter is the fully qualified name of a subroutine which is a signal handler. The second parameter is a POSIX::SigSet object. The third parameter contains the
sa_flags
.
$sigset = POSIX::SigSet->new; $sigaction = POSIX::SigAction->new('main::handler', $sigset, &POSIX::SA_NOCLDSTOP);
This POSIX::SigAction object should be used with the POSIX::sigaction() function.
POSIX::SigSet
new
Creates a new SigSet object. This object will be destroyed automatically when it is no longer needed. Arguments may be supplied to initialize the set. Create an empty set:
$sigset = POSIX::SigSet->new;
Create a set with
SIGUSR1
:
$sigset = POSIX::SigSet->new(&POSIX::SIGUSR1);
addset
Adds a signal to a SigSet object. Returns undef on failure.
$sigset->addset(&POSIX::SIGUSR2);
delset
Removes a signal from the SigSet object. Returns undef on failure.
$sigset->delset(&POSIX::SIGUSR2);
emptyset
Initializes the SigSet object to be empty. Returns undef on failure.
$sigset->emptyset();
fillset
Initializes the SigSet object to include all signals. Returns undef on failure.
$sigset->fillset();
ismember
Tests the SigSet object to see whether it contains a specific signal.
if ($sigset->ismember(&POSIX::SIGUSR1 ) ){ print "contains SIGUSR1\n"; }
POSIX::Termios
new
Creates a new Termios object. This object will be destroyed automatically when it is no longer needed.
$termios = POSIX::Termios->new;
getattr
Gets terminal control attributes for a given fd , 0 by default. Returns undef on failure. Obtain the attributes for standard input:
$termios->getattr()
Obtain the attributes for standard output:
$termios->getattr(1)
getcc
Retrieves a value from the
c_cc
field of a Termios object. The
c_cc
field is an array, so an index must be specified.
$c_cc[1] = $termios->getcc(&POSIX::VEOF);
getcflag
Retrieves the
c_cflag
field of a Termios object.
$c_cflag = $termios->getcflag;
getiflag
Retrieves the
c_iflag
field of a Termios object.
$c_iflag = $termios->getiflag;
getispeed
Retrieves the input baud rate.
$ispeed = $termios->getispeed;
getlflag
Retrieves the
c_lflag
field of a Termios object.
$c_lflag = $termios->getlflag;
getoflag
Retrieves the
c_oflag
field of a Termios object.
$c_oflag = $termios->getoflag;
getospeed
Retrieves the output baud rate.
$ospeed = $termios->getospeed;
setattr
Sets terminal control attributes for a given fd . Returns undef on failure. The following sets attributes immediately for standard output.
$termios->setattr(1, &POSIX::TCSANOW);
setcc
Sets a value in the
c_cc
field of a Termios object. The
c_cc
field is an array, so an index must be specified.
$termios->setcc(&POSIX::VEOF, 4);
setcflag
Sets the
c_cflag
field of a Termios object.
$termios->setcflag(&POSIX::CLOCAL);
setiflag
Sets the
c_iflag
field of a Termios object.
$termios->setiflag(&POSIX::BRKINT);
setispeed
Sets the input baud rate. Returns undef on failure.
$termios->setispeed(&POSIX::B9600);
setlflag
Sets the
c_lflag
field of a Termios object.
$termios->setlflag(&POSIX::ECHO);
setoflag
Set the
c_oflag
field of a Termios object.
$termios->setoflag(&POSIX::OPOST);
setospeed
Sets the output baud rate. Returns undef on failure.
$termios->setospeed(&POSIX::B9600);
B0 B50 B75 B110 B134 B150 B200 B300 B600 B1200 B1800 B2400 B4800 B9600 B19200 B38400
TCSADRAIN TCSANOW TCOON TCIOFLUSH TCOFLUSH TCION TCIFLUSH TCSAFLUSH TCIOFF TCOOFF
c_cc
index values
VEOF VEOL VERASE VINTR VKILL VQUIT VSUSP VSTART VSTOP VMIN VTIME NCCS
c_cflag
field values
CLOCAL CREAD CSIZE CS5 CS6 CS7 CS8 CSTOPB HUPCL PARENB PARODD
c_iflag
field values
BRKINT ICRNL IGNBRK IGNCR IGNPAR INLCR INPCK ISTRIP IXOFF IXON PARMRK
c_lflag
field values
ECHO ECHOE ECHOK ECHONL ICANON IEXTEN ISIG NOFLSH TOSTOP
c_oflag
field values
OPOST
While these constants are associated with the Termios class, note that they are actually symbols in the POSIX package.
Here's an example of a complete program for getting unbuffered, single-character input on a POSIX system:
#!/usr/bin/perl -w use strict; $| = 1; for (1..4) { my $got; print "gimme: "; $got = getone(); print "--> $got\n"; } exit; BEGIN { use POSIX qw(:termios_h); my ($term, $oterm, $echo, $noecho, $fd_stdin); $fd_stdin = fileno(STDIN); $term = POSIX::Termios->new(); $term->getattr($fd_stdin); $oterm = $term->getlflag(); $echo = ECHO | ECHOK | ICANON; $noecho = $oterm & ~$echo; sub cbreak { $term->setlflag($noecho); $term->setcc(VTIME, 1); $term->setattr($fd_stdin, TCSANOW); } sub cooked { $term->setlflag($oterm); $term->setcc(VTIME, 0); $term->setattr($fd_stdin, TCSANOW); } sub getone { my $key = ""; cbreak(); sysread(STDIN, $key, 1); cooked(); return $key; } } END { cooked() }
Function Name | Definition |
---|---|
_exit
|
Identical to the C function _exit (2). |
abort
|
Identical to the C function abort (3). |
abs
|
Identical to Perl's built-in abs function. |
access
|
Determines the accessibility of a file. Returns undef on failure. if (POSIX::access("/", &POSIX::R_OK ) ){ print "have read permission\n"; } |
acos
|
Identical to the C function acos (3). |
alarm
|
Identical to Perl's built-in alarm function. |
asctime
|
Identical to the C function asctime (3). |
asin
|
Identical to the C function asin (3). |
assert
|
Similar to the C macro assert (3). |
atan
|
Identical to the C function atan (3). |
atan2
|
Identical to Perl's built-in atan2 function. |
atexit
|
C-specific: use |
atof
|
C-specific. |
atoi
|
C-specific. |
atol
|
C-specific. |
bsearch
|
Not supplied. You should probably be using a hash anyway. |
calloc
|
C-specific. |
ceil
|
Identical to the C function ceil (3). |
chdir
|
Identical to Perl's built-in chdir function. |
chmod
|
Identical to Perl's built-in chmod function. |
chown
|
Identical to Perl's built-in chown function. |
clearerr
|
Use method |
clock
|
Identical to the C function clock (3). |
close
|
Closes a file. This uses file descriptors such as those obtained by calling $fd = POSIX::open("foo", &POSIX::O_RDONLY); POSIX::close($fd); |
closedir
|
Identical to Perl's built-in closedir function. |
cos
|
Identical to Perl's built-in cos function. |
cosh
|
Identical to the C function cosh (3). |
creat
|
Creates a new file. This returns a file descriptor like the ones returned by $fd = POSIX::creat("foo", 0611); POSIX::close($fd); |
ctermid
|
Generates the path name for the controlling terminal. $path = POSIX::ctermid(); |
ctime
|
Identical to the C function ctime (3) |
cuserid
|
Gets the character login name of the user. $name = POSIX::cuserid(); |
difftime
|
Identical to the C function difftime (3). |
div
|
C-specific. |
dup
|
Similar to the C function
dup
(2). Uses file descriptors such as those obtained by calling |
dup2
|
Similar to the C function
dup2
(2). Uses file descriptors such as those obtained by calling |
errno
|
Returns the value of errno . $errno = POSIX::errno(); |
execl
|
C-specific; use Perl's exec instead. |
execle
|
C-specific; use Perl's exec instead. |
execlp
|
C-specific; use Perl's exec instead. |
execv
|
C-specific; use Perl's exec instead. |
execve
|
C-specific; use Perl's exec instead. |
execvp
|
C-specific; use Perl's exec instead. |
exit
|
Identical to Perl's built-in exit function. |
exp
|
Identical to Perl's built-in exp function. |
fabs
|
Identical to Perl's built-in abs function. |
fclose
|
Use method |
fcntl
|
Identical to Perl's built-in fcntl function. |
fdopen
|
Use method |
feof
|
Use method |
ferror
|
Use method |
fflush
|
Use method |
fgetc
|
Use method |
fgetpos
|
Use method |
fgets
|
Use method |
fileno
|
Use method |
floor
|
Identical to the C function floor (3). |
fmod
|
Identical to the C function fmod (3). |
fopen
|
Use method |
fork
|
Identical to Perl's built-in fork function. |
fpathconf
|
Retrieves the value of a configurable limit on a file or directory. This uses file descriptors such as those obtained by calling $fd = POSIX::open("/tmp/foo", &POSIX::O_RDONLY); $path_max = POSIX::fpathconf($fd, &POSIX::_PC_PATH_MAX); |
fprintf
|
C-specific; use Perl's built-in printf function instead. |
fputc
|
C-specific; use Perl's built-in print function instead. |
fputs
|
C-specific; use Perl's built-in print function instead. |
fread
|
C-specific; use Perl's built-in read function instead. |
free
|
C-specific |
freopen
|
C-specific; use Perl's built-in open function instead. |
frexp
|
Returns the mantissa and exponent of a floating-point number. ($mantissa, $exponent) = POSIX::frexp(3.14); |
fscanf
|
C-specific; use |
fseek
|
Use method |
fsetpos
|
Use method |
fstat
|
Gets file status. This uses file descriptors such as those obtained by calling $fd = POSIX::open("foo", &POSIX::O_RDONLY); @stats = POSIX::fstat($fd); |
ftell
|
Use method |
fwrite
|
C-specific; use Perl's built-in print function instead. |
getc
|
Identical to Perl's built-in getc function. |
getchar
|
Returns one character from |
getcwd
|
Returns the name of the current working directory. |
getegid
|
Returns the effective group ID (gid). |
getenv
|
Returns the value of the specified environment variable. |
geteuid
|
Returns the effective user ID (uid). |
getgid
|
Returns the user's real group ID (gid). |
getgrgid
|
Identical to Perl's built-in getgrgid function. |
getgrnam
|
Identical to Perl's built-in getgrnam function. |
getgroups
|
Returns the ids of the user's supplementary groups. |
getlogin
|
Identical to Perl's built-in getlogin function. |
getpgrp
|
Identical to Perl's built-in getpgrp function. |
getpid
|
Returns the process's ID (pid). |
getppid
|
Identical to Perl's built-in getppid function. |
getpwnam
|
Identical to Perl's built-in getpwnam function. |
getpwuid
|
Identical to Perl's built-in getpwuid function. |
gets
|
Returns one line from |
getuid
|
Returns the user's ID (uid). |
gmtime
|
Identical to Perl's built-in gmtime function. |
isalnum
|
Identical to the C function, except that it can apply to a single character or to a whole string. (If applied to a whole string, all characters must be of the indicated category.) |
isalpha
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
isatty
|
Returns a Boolean indicating whether the specified filehandle is connected to a TTY. |
iscntrl
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
isdigit
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
isgraph
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
islower
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
isprint
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
ispunct
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
isspace
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
isupper
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
isxdigit
|
Identical to the C function, except that it can apply to a single character or to a whole string. |
kill
|
Identical to Perl's built-in kill function. |
labs
|
C-specific; use Perl's built-in abs function instead. |
ldexp
|
Identical to the C function ldexp (3). |
ldiv
|
C-specific; use the division operator |
link
|
Identical to Perl's built-in link function. |
localeconv
|
Gets numeric formatting information. Returns a reference to a hash containing the current locale formatting values. The database for the |
$loc = POSIX::setlocale(&POSIX::LC_ALL, "de"); print "Locale = $loc\n"; $lconv = POSIX::localeconv(); print "decimal_point = ", $lconv->{decimal_point}, "\n"; print "thousands_sep = ", $lconv->{thousands_sep}, "\n"; print "grouping = ", $lconv->{grouping}, "\n"; print "int_curr_symbol = ", $lconv->{int_curr_symbol}, "\n"; print "currency_symbol = ", $lconv->{currency_symbol}, "\n"; print "mon_decimal_point = ", $lconv->{mon_decimal_point}, "\n"; print "mon_thousands_sep = ", $lconv->{mon_thousands_sep}, "\n"; print "mon_grouping = ", $lconv->{mon_grouping}, "\n"; print "positive_sign = ", $lconv->{positive_sign}, "\n"; print "negative_sign = ", $lconv->{negative_sign}, "\n"; |
|
print "int_frac_digits = ", $lconv->{int_frac_digits}, "\n"; print "frac_digits = ", $lconv->{frac_digits}, "\n"; print "p_cs_precedes = ", $lconv->{p_cs_precedes}, "\n"; print "p_sep_by_space = ", $lconv->{p_sep_by_space}, "\n"; print "n_cs_precedes = ", $lconv->{n_cs_precedes}, "\n"; print "n_sep_by_space = ", $lconv->{n_sep_by_space}, "\n"; print "p_sign_posn = ", $lconv->{p_sign_posn}, "\n"; print "n_sign_posn = ", $lconv->{n_sign_posn}, "\n"; |
|
localtime
|
Identical to Perl's built-in localtime function. |
log
|
Identical to Perl's built-in log function. |
log10
|
Identical to the C function log10 (3). |
longjmp
|
C-specific; use Perl's built-in die function instead. |
lseek
|
Moves the read/write file pointer. This uses file descriptors such as those obtained by calling $fd = POSIX::open("foo", &POSIX::O_RDONLY); $off_t = POSIX::lseek($fd, 0, &POSIX::SEEK_SET);Returns undef on failure. |
malloc
|
C-specific. |
mblen
|
Identical to the C function mblen (3). |
mbstowcs
|
Identical to the C function mbstowcs (3). |
mbtowc
|
Identical to the C function mbtowc (3). |
memchr
|
C-specific; use Perl's built-in index instead. |
memcmp
|
C-specific; use eq instead. |
memcpy
|
C-specific; use = instead. |
memmove
|
C-specific; use = instead. |
memset
|
C-specific; use x instead. |
mkdir
|
Identical to Perl's built-in mkdir function. |
mkfifo
|
Similar to the C function mkfifo (2). Returns undef on failure. |
mktime
|
Converts date/time information to a calendar time. Returns undef on failure. Synopsis: |
mktime( |
|
The month ( |
|
$time_t = POSIX::mktime(0, 30, 10, 12, 11, 95); print "Date = ", POSIX::ctime($time_t); |
|
modf
|
Returns the integral and fractional parts of a floating-point number. ($fractional, $integral) = POSIX::modf(3.14); |
nice
|
Similar to the C function nice (3). Returns undef on failure. |
offsetof
|
C-specific. |
open
|
Opens a file for reading or writing. This returns file descriptors, not Perl filehandles. Returns
undef
on failure. Use $fd = POSIX::open("foo");Open a file for reading and writing: $fd = POSIX::open("foo", &POSIX::O_RDWR);Open a file for writing, with truncation: $fd = POSIX::open("foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC);Create a new file with mode 0644; set up the file for writing: $fd = POSIX::open("foo", &POSIX::O_CREAT | &POSIX::O_WRONLY, 0644); |
opendir
|
Opens a directory for reading. Returns undef on failure. $dir = POSIX::opendir("/tmp"); @files = POSIX::readdir($dir); POSIX::closedir($dir); |
pathconf
|
Retrieves the value of a configurable limit on a file or directory. Returns undef on failure. The following will determine the maximum length of the longest allowable pathname on the filesystem that holds /tmp : $path_max = POSIX::pathconf("/tmp", &POSIX::_PC_PATH_MAX); |
pause
|
Similar to the C function pause (3). Returns undef on failure. |
perror
|
Identical to the C function perror (3). |
pipe
|
Creates an interprocess channel. Returns file descriptors like those returned by ($fd0, $fd1) = POSIX::pipe(); POSIX::write($fd0, "hello", 5); POSIX::read($fd1, $buf, 5); |
pow
|
Computes $ret = POSIX::pow($x, $exponent); |
printf
|
Prints the specified arguments to |
putc
|
C-specific; use Perl's built-in print function instead. |
putchar
|
C-specific; use Perl's built-in print function instead. |
puts
|
C-specific; use Perl's built-in print function instead. |
qsort
|
C-specific; use Perl's built-in sort function instead. |
raise
|
Sends the specified signal to the current process. |
rand
|
Non-portable; use Perl's built-in rand function instead. |
read
|
Reads from a file. This uses file descriptors such as those obtained by calling $fd = POSIX::open("foo", &POSIX::O_RDONLY); $bytes = POSIX::read($fd, $buf, 3); |
readdir
|
Identical to Perl's built-in readdir function. |
realloc
|
C-specific. |
remove
|
Identical to Perl's built-in unlink function. |
rename
|
Identical to Perl's built-in rename function. |
rewind
|
Seeks to the beginning of the file. |
rewinddir
|
Identical to Perl's built-in rewinddir function. |
rmdir
|
Identical to Perl's built-in rmdir function. |
scanf
|
C-specific; use |
setgid
|
Sets the real group id for this process, like assigning to the special variable $( . |
setjmp
|
C-specific; use |
setlocale
|
Modifies and queries program's locale. The following will set the traditional UNIX system locale behavior. $loc = POSIX::setlocale(&POSIX::LC_ALL, "C"); |
setpgid
|
Similar to the C function setpgid (2). Returns undef on failure. |
setsid
|
Identical to the C function setsid (8). |
setuid
|
Sets the real user ID for this process, like assigning to the special variable $< . |
sigaction
|
Detailed signal management. This uses POSIX::SigAction objects for the POSIX::sigaction($sig, $action, $oldaction) |
siglongjmp
|
C-specific; use Perl's built-in die function instead. |
sigpending
|
Examine signals that are blocked and pending. This uses POSIX::SigSet objects for the POSIX::sigpending($sigset) |
sigprocmask
|
Changes and/or examines this process's signal mask. This uses POSIX::SigSet objects for the POSIX::sigprocmask($how, $sigset, $oldsigset) |
sigsetjmp
|
C-specific; use |
sigsuspend
|
Install a signal mask and suspend process until signal arrives. This uses POSIX::SigSet objects for the POSIX::sigsuspend($signal_mask) |
sin
|
Identical to Perl's built-in sin function. |
sinh
|
Identical to the C function sinh (3). |
sleep
|
Identical to Perl's built-in sleep function. |
sprintf
|
Identical to Perl's built-in sprintf function. |
sqrt
|
Identical to Perl's built-in sqrt function. |
srand
|
Identical to Perl's built-in srand function. |
sscanf
|
C-specific; use regular expressions instead. |
stat
|
Identical to Perl's built-in stat function. |
strcat
|
C-specific; use |
strchr
|
C-specific; use index instead. |
strcmp
|
C-specific; use eq instead. |
strcoll
|
Identical to the C function strcoll (3). |
strcpy
|
C-specific; use |
strcspn
|
C-specific; use regular expressions instead. |
strerror
|
Returns the error string for the specified errno . |
strftime
|
Converts date and time information to string. Returns the string. strftime(The month (
mon
), weekday (
wday
), and yearday (
yday
) begin at zero. That is, January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The year (
year
) is given in years since 1900. That is, the year 1995 is 95; the year 2001 is 101. Consult your system's
strftime
(3) manpage for details about these and the other arguments. The string for Tuesday, December 12, 1995: $str = POSIX::strftime("%A, %B %d, %Y", 0, 0, 0, 12, 11, 95, 2); print "$str\n"; |
strlen
|
C-specific; use length instead. |
strncat
|
C-specific; use |
strncmp
|
C-specific; use eq and/or substr instead. |
strncpy
|
C-specific; use |
strpbrk
|
C-specific. |
strrchr
|
|
strspn
|
C-specific. |
strstr
|
Identical to Perl's built-in index function. |
strtod
|
C-specific. |
strtok
|
C-specific. |
strtol
|
C-specific. |
strtoul
|
C-specific. |
strxfrm
|
String transformation. Returns the transformed string. $dst = POSIX::strxfrm($src); |
sysconf
|
Retrieves values of system configurable variables. Returns undef on failure. The following will get the machine's clock speed. $clock_ticks = POSIX::sysconf(&POSIX::_SC_CLK_TCK); |
system
|
Identical to Perl's built-in system function. |
tan
|
Identical to the C function tan (3). |
tanh
|
Identical to the C function tanh (3). |
tcdrain
|
Similar to the C function tcdrain (3). Returns undef on failure. |
tcflow
|
Similar to the C function tcflow (3). Returns undef on failure. |
tcflush
|
Similar to the C function tcflush (3). Returns undef on failure. |
tcgetpgrp
|
Identical to the C function tcgetpgrp (3). |
tcsendbreak
|
Similar to the C function tcsendbreak (3). Returns undef on failure. |
tcsetpgrp
|
Similar to the C function tcsetpgrp (3). Returns undef on failure. |
time
|
Identical to Perl's built-in time function. |
times
|
Returns elapsed realtime since some point in the past (such as system startup), user and system times for this process, and user and system times for child processes. All times are returned in clock ticks. ($realtime, $user, $system, $cuser, $csystem) = POSIX::times();Note: Perl's built-in times function returns four values, measured in seconds. |
tmpfile
|
Use method |
tmpnam
|
Returns a name for a temporary file. $tmpfile = POSIX::tmpnam(); |
tolower
|
Identical to Perl's built-in lc function. |
toupper
|
Identical to Perl's built-in uc function. |
ttyname
|
Identical to the C function ttyname (3). |
tzname
|
Retrieves the time conversion information from the POSIX::tzset(); ($std, $dst) = POSIX::tzname(); |
tzset
|
Identical to the C function tzset (3). |
umask
|
Identical to Perl's built-in umask function. |
uname
|
Gets name of current operating system. ($sysname, $nodename, $release, $version, $machine) = POSIX::uname(); |
ungetc
|
Use method |
unlink
|
Identical to Perl's built-in unlink function. |
utime
|
Identical to Perl's built-in utime function. |
vfprintf
|
C-specific. |
vprintf
|
C-specific. |
vsprintf
|
C-specific. |
wait
|
Identical to Perl's built-in wait function. |
waitpid
|
Wait for a child process to change state. This is identical to Perl's built-in waitpid function. $pid = POSIX::waitpid(-1, &POSIX::WNOHANG); print "status = ", ($? / 256), "\n"; |
wcstombs
|
Identical to the C function wcstombs (3). |
wctomb
|
Identical to the C function wctomb (3). |
write
|
Writes to a file. Uses file descriptors such as those obtained by calling $fd = POSIX::open("foo", &POSIX::O_WRONLY); $buf = "hello"; $bytes = POSIX::write($b, $buf, 5); |
_PC_CHOWN_RESTRICTED
|
_PC_LINK_MAX
|
_PC_MAX_CANON
|
_PC_MAX_INPUT
|
_PC_NAME_MAX
|
_PC_NO_TRUNC
|
_PC_PATH_MAX
|
_PC_PIPE_BUF
|
_PC_VDISABLE
|
_POSIX_ARG_MAX
|
_POSIX_CHILD_MAX
|
_POSIX_CHOWN_RESTRICTED
|
_POSIX_JOB_CONTROL
|
_POSIX_LINK_MAX
|
_POSIX_MAX_CANON
|
_POSIX_MAX_INPUT
|
_POSIX_NAME_MAX
|
_POSIX_NGROUPS_MAX
|
_POSIX_NO_TRUNC
|
_POSIX_OPEN_MAX
|
_POSIX_PATH_MAX
|
_POSIX_PIPE_BUF
|
_POSIX_SAVED_IDS
|
_POSIX_SSIZE_MAX
|
_POSIX_STREAM_MAX
|
_POSIX_TZNAME_MAX
|
_POSIX_VDISABLE
|
_POSIX_VERSION
|
_SC_ARG_MAX
|
|||
_SC_CHILD_MAX
|
_SC_CLK_TCK
|
_SC_JOB_CONTROL
|
_SC_NGROUPS_MAX
|
_SC_OPEN_MAX
|
_SC_SAVED_IDS
|
_SC_STREAM_MAX
|
_SC_TZNAME_MAX
|
_SC_VERSION
|
E2BIG
|
||||||
EACCES
|
EAGAIN
|
EBADF
|
EBUSY
|
ECHILD
|
EDEADLK
|
EDOM
|
EEXIST
|
EFAUL
|
EFBIG
|
EINTR
|
EINVAL
|
EIO
|
EISDIR
|
EMFILE
|
EMLINK
|
ENAMETOOLONG
|
ENFILE
|
ENODE
|
ENOENT
|
ENOEXEC
|
ENOLCK
|
ENOMEM
|
ENOSPC
|
ENOSYS
|
ENOTDIR
|
ENOTEMPTY
|
ENOTTY
|
ENXIO
|
EPERM
|
EPIPE
|
ERANGE
|
EROFS
|
ESPIPE
|
ESRCH
|
EXDEV
|
FD_CLOEXEC
|
F_DUPFD
|
F_GETFD
|
F_GETFL
|
F_GETLK
|
F_OK
|
F_RDLCK
|
F_SETFD
|
F_SETFL
|
F_SETLK
|
F_SETLKW
|
F_UNLCK
|
F_WRLCK
|
O_ACCMODE
|
O_APPEND
|
O_CREAT
|
O_EXCL
|
O_NOCTTY
|
O_NONBLOCK
|
O_RDONLY
|
O_RDWR
|
O_TRUNC
|
O_WRONLY
|
DBL_DIG
|
DBL_EPSILON
|
DBL_MANT_DIG
|
|
DBL_MAX
|
DBL_MAX_10_EXP
|
DBL_MAX_EXP
|
DBL_MIN
|
DBL_MIN_10_EXP
|
DBL_MIN_EXP
|
FLT_DIG
|
FLT_EPSILON
|
FLT_MANT_DIG
|
FLT_MAX
|
FLT_MAX_10_EXP
|
FLT_MAX_EXP
|
FLT_MIN
|
FLT_MIN_10_EXP
|
FLT_MIN_EXP
|
FLT_RADIX
|
FLT_ROUNDS
|
LDBL_DIG
|
LDBL_EPSILON
|
LDBL_MANT_DIG
|
LDBL_MAX
|
LDBL_MAX_10_EXP
|
LDBL_MAX_EXP
|
LDBL_MIN
|
LDBL_MIN_10_EXP
|
LDBL_MIN_EXP
|
ARG_MAX
|
CHAR_BIT
|
CHAR_MAX
|
CHAR_MIN
|
CHILD_MAX
|
INT_MAX
|
INT_MIN
|
LINK_MAX
|
LONG_MAX
|
LONG_MIN
|
MAX_CANON
|
MAX_INPUT
|
MB_LEN_MAX
|
NAME_MAX
|
NGROUPS_MAX
|
OPEN_MAX
|
PATH_MAX
|
PIPE_BUF
|
SCHAR_MAX
|
SCHAR_MIN
|
SHRT_MAX
|
SHRT_MIN
|
SSIZE_MAX
|
STREAM_MAX
|
TZNAME_MAX
|
UCHAR_MAX
|
UINT_MAX
|
ULONG_MAX USHRT_MAX
|
LC_ALL
|
LC_COLLATE
|
LC_CTYPE
|
LC_MONETARY
|
LC_NUMERIC
|
LC_TIME
|
HUGE_VAL
|
SA_NOCLDSTOP
|
SIGABRT
|
SIGALRM
|
|||
SIGCHLD
|
SIGCONT
|
SIGFPE
|
SIGHUP
|
SIGILL
|
SIGINT
|
SIGKILL
|
SIGPIPE
|
SIGQUIT
|
SIGSEGV
|
SIGSTOP
|
SIGTERM
|
SIGTSTP
|
SIGTTIN
|
SIGTTOU
|
SIGUSR1
|
SIGUSR2
|
SIG_BLOCK
|
SIG_DFL
|
SIG_ERR
|
SIG_IGN
|
SIG_SETMASK
|
SIG_UNBLOCK
|
S_IRGRP
|
S_IROTH
|
S_IRUSR
|
S_IRWXG
|
S_IRWXO
|
||
S_IRWXU
|
S_ISGID
|
S_ISUID
|
S_IWGRP
|
S_IWOTH
|
S_IWUSR
|
S_IXGRP
|
S_IXOTH
|
S_IXUSR
|
S_ISBLK
|
S_ISCHR
|
S_ISDIR
|
S_ISFIFO
|
S_ISREG
|
EXIT_FAILURE
|
EXIT_SUCCESS
|
MB_CUR_MAX
|
RAND_MAX
|
BUFSIZ
|
EOF
|
FILENAME_MAX
|
|
L_ctermid
|
L_cuserid
|
L_tmpname
|
TMP_MAX
|
CLK_TCK
|
CLOCKS_PER_SEC
|
R_OK
|
SEEK_CUR
|
|||
SEEK_END
|
SEEK_SET
|
STDIN_FILENO
|
STDOUT_FILENO
|
STRERR_FILENO
|
W_OK
|
X_OK
|
WNOHANG
|
WUNTRACED
|
7.2.48 overload - Overload Perl's Mathematical Operations | 7.2.50 Pod::Text - Convert POD Data to Formatted ASCII Text |