functions with the same name as a built-in Perl function, such as
C<abs>, C<alarm>, C<rmdir>, C<write>, etc.., which will be exported
only if you ask for them explicitly. This is an unfortunate backwards
-compatibility feature. You can stop the exporting by saying C<use
-POSIX ()> and then use the fully qualified names (ie. C<POSIX::SEEK_END>),
+compatibility feature. You can stop the exporting by saying S<C<use
+POSIX ()>> and then use the fully qualified names (I<e.g.>, C<POSIX::SEEK_END>),
or by giving an explicit import list. If you do neither, and opt for the
-default, C<use POSIX;> has to import I<553 symbols>.
+default, S<C<use POSIX;>> has to import I<553 symbols>.
This document gives a condensed list of the features available in the POSIX
module. Consult your operating system's manpages for general information on
A few functions are not implemented because they are C specific. If you
attempt to call these, they will print a message telling you that they
-aren't implemented, and 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".
+aren't implemented, and suggest using the Perl equivalent, should one
+exist. For example, trying to access the C<setjmp()> call will elicit the
+message "C<setjmp() is C-specific: use eval {} instead>".
Furthermore, some evil vendors will claim 1003.1 compliance, but in fact
are not so: they will not pass the PCTS (POSIX Compliance Test Suites).
-For example, one vendor may not define EDEADLK, or the semantics of the
-errno values set by open(2) might not be quite right. Perl does not
+For example, one vendor may not define C<EDEADLK>, or the semantics of the
+errno values set by C<open(2)> might not be quite right. Perl does not
attempt to verify POSIX compliance. That means you can currently
successfully say "use POSIX", and then later in your program you find
-that your vendor has been lax and there's no usable ICANON macro after
+that your vendor has been lax and there's no usable C<ICANON> macro after
all. This could be construed to be a bug.
=head1 FUNCTIONS
=over 8
-=item _exit
+=item C<_exit>
This is identical to the C function C<_exit()>. It exits the program
immediately which means among other things buffered I/O is B<not> flushed.
projects under way to have threads with more POSIXly semantics in Linux).
If you want not to return from a thread, detach the thread.
-=item abort
+=item C<abort>
This is identical to the C function C<abort()>. It terminates the
process with a C<SIGABRT> signal unless caught by a signal handler or
if the handler does not return normally (it e.g. does a C<longjmp>).
-=item abs
+=item C<abs>
This is identical to Perl's builtin C<abs()> function, returning
the absolute value of its numerical argument.
-=item access
+=item C<access>
Determines the accessibility of a file.
you are preparing for the permissions might change: a classic
I<race condition>.
-=item acos
+=item C<acos>
This is identical to the C function C<acos()>, returning
the arcus cosine of its numerical argument. See also L<Math::Trig>.
-=item alarm
+=item C<alarm>
This is identical to Perl's builtin C<alarm()> function,
either for arming or disarming the C<SIGARLM> timer.
-=item asctime
+=item C<asctime>
This is identical to the C function C<asctime()>. It returns
a string of the form
1900-based: 2001 equals C<101>. C<$wday> and C<$yday> default to zero
(and are usually ignored anyway), and C<$isdst> defaults to -1.
-=item asin
+=item C<asin>
This is identical to the C function C<asin()>, returning
the arcus sine of its numerical argument. See also L<Math::Trig>.
-=item assert
+=item C<assert>
Unimplemented, but you can use L<perlfunc/die> and the L<Carp> module
to achieve similar things.
-=item atan
+=item C<atan>
This is identical to the C function C<atan()>, returning the
arcus tangent of its numerical argument. See also L<Math::Trig>.
-=item atan2
+=item C<atan2>
This is identical to Perl's builtin C<atan2()> function, returning
the arcus tangent defined by its two numerical arguments, the I<y>
coordinate and the I<x> coordinate. See also L<Math::Trig>.
-=item atexit
+=item C<atexit>
-atexit() is C-specific: use C<END {}> instead, see L<perlsub>.
+C<atexit()> is C-specific: use C<END {}> instead, see L<perlsub>.
-=item atof
+=item C<atof>
-atof() is C-specific. Perl converts strings to numbers transparently.
+C<atof()> is C-specific. Perl converts strings to numbers transparently.
If you need to force a scalar to a number, add a zero to it.
-=item atoi
+=item C<atoi>
-atoi() is C-specific. Perl converts strings to numbers transparently.
+C<atoi()> is C-specific. Perl converts strings to numbers transparently.
If you need to force a scalar to a number, add a zero to it.
If you need to have just the integer part, see L<perlfunc/int>.
-=item atol
+=item C<atol>
-atol() is C-specific. Perl converts strings to numbers transparently.
+C<atol()> is C-specific. Perl converts strings to numbers transparently.
If you need to force a scalar to a number, add a zero to it.
If you need to have just the integer part, see L<perlfunc/int>.
-=item bsearch
+=item C<bsearch>
-bsearch() not supplied. For doing binary search on wordlists,
+C<bsearch()> not supplied. For doing binary search on wordlists,
see L<Search::Dict>.
-=item calloc
+=item C<calloc>
-calloc() is C-specific. Perl does memory management transparently.
+C<calloc()> is C-specific. Perl does memory management transparently.
-=item ceil
+=item C<ceil>
This is identical to the C function C<ceil()>, returning the smallest
integer value greater than or equal to the given numerical argument.
-=item chdir
+=item C<chdir>
This is identical to Perl's builtin C<chdir()> function, allowing
one to change the working (default) directory, see L<perlfunc/chdir>.
-=item chmod
+=item C<chmod>
This is identical to Perl's builtin C<chmod()> function, allowing
one to change file and directory permissions, see L<perlfunc/chmod>.
-=item chown
+=item C<chown>
This is identical to Perl's builtin C<chown()> function, allowing one
to change file and directory owners and groups, see L<perlfunc/chown>.
-=item clearerr
+=item C<clearerr>
Use the method C<IO::Handle::clearerr()> instead, to reset the error
state (if any) and EOF state (if any) of the given stream.
-=item clock
+=item C<clock>
This is identical to the C function C<clock()>, returning the
amount of spent processor time in microseconds.
-=item close
+=item C<close>
Close the file. This uses file descriptors such as those obtained by calling
C<POSIX::open>.
See also L<perlfunc/close>.
-=item closedir
+=item C<closedir>
This is identical to Perl's builtin C<closedir()> function for closing
a directory handle, see L<perlfunc/closedir>.
-=item cos
+=item C<cos>
This is identical to Perl's builtin C<cos()> function, for returning
the cosine of its numerical argument, see L<perlfunc/cos>.
See also L<Math::Trig>.
-=item cosh
+=item C<cosh>
This is identical to the C function C<cosh()>, for returning
the hyperbolic cosine of its numeric argument. See also L<Math::Trig>.
-=item creat
+=item C<creat>
Create a new file. This returns a file descriptor like the ones returned by
C<POSIX::open>. Use C<POSIX::close> to close the file.
See also L<perlfunc/sysopen> and its C<O_CREAT> flag.
-=item ctermid
+=item C<ctermid>
Generates the path name for the controlling terminal.
$path = POSIX::ctermid();
-=item ctime
+=item C<ctime>
This is identical to the C function C<ctime()> and equivalent
to C<asctime(localtime(...))>, see L</asctime> and L</localtime>.
-=item cuserid
+=item C<cuserid>
Get the login name of the owner of the current process.
$name = POSIX::cuserid();
-=item difftime
+=item C<difftime>
This is identical to the C function C<difftime()>, for returning
the time difference (in seconds) between two times (as returned
by C<time()>), see L</time>.
-=item div
+=item C<div>
-div() is C-specific, use L<perlfunc/int> on the usual C</> division and
+C<div()> is C-specific, use L<perlfunc/int> on the usual C</> division and
the modulus C<%>.
-=item dup
+=item C<dup>
This is similar to the C function C<dup()>, for duplicating a file
descriptor.
Returns C<undef> on failure.
-=item dup2
+=item C<dup2>
This is similar to the C function C<dup2()>, for duplicating a file
descriptor to an another known file descriptor.
Returns C<undef> on failure.
-=item errno
+=item C<errno>
Returns the value of errno.
This identical to the numerical values of the C<$!>, see L<perlvar/$ERRNO>.
-=item execl
+=item C<execl>
-execl() is C-specific, see L<perlfunc/exec>.
+C<execl()> is C-specific, see L<perlfunc/exec>.
-=item execle
+=item C<execle>
-execle() is C-specific, see L<perlfunc/exec>.
+C<execle()> is C-specific, see L<perlfunc/exec>.
-=item execlp
+=item C<execlp>
-execlp() is C-specific, see L<perlfunc/exec>.
+C<execlp()> is C-specific, see L<perlfunc/exec>.
-=item execv
+=item C<execv>
-execv() is C-specific, see L<perlfunc/exec>.
+C<execv()> is C-specific, see L<perlfunc/exec>.
-=item execve
+=item C<execve>
-execve() is C-specific, see L<perlfunc/exec>.
+C<execve()> is C-specific, see L<perlfunc/exec>.
-=item execvp
+=item C<execvp>
-execvp() is C-specific, see L<perlfunc/exec>.
+C<execvp()> is C-specific, see L<perlfunc/exec>.
-=item exit
+=item C<exit>
This is identical to Perl's builtin C<exit()> function for exiting the
program, see L<perlfunc/exit>.
-=item exp
+=item C<exp>
This is identical to Perl's builtin C<exp()> function for
returning the exponent (I<e>-based) of the numerical argument,
see L<perlfunc/exp>.
-=item fabs
+=item C<fabs>
This is identical to Perl's builtin C<abs()> function for returning
the absolute value of the numerical argument, see L<perlfunc/abs>.
-=item fclose
+=item C<fclose>
Use method C<IO::Handle::close()> instead, or see L<perlfunc/close>.
-=item fcntl
+=item C<fcntl>
This is identical to Perl's builtin C<fcntl()> function,
see L<perlfunc/fcntl>.
-=item fdopen
+=item C<fdopen>
Use method C<IO::Handle::new_from_fd()> instead, or see L<perlfunc/open>.
-=item feof
+=item C<feof>
Use method C<IO::Handle::eof()> instead, or see L<perlfunc/eof>.
-=item ferror
+=item C<ferror>
Use method C<IO::Handle::error()> instead.
-=item fflush
+=item C<fflush>
Use method C<IO::Handle::flush()> instead.
-See also L<perlvar/$OUTPUT_AUTOFLUSH>.
+See also C<L<perlvar/$OUTPUT_AUTOFLUSH>>.
-=item fgetc
+=item C<fgetc>
Use method C<IO::Handle::getc()> instead, or see L<perlfunc/read>.
-=item fgetpos
+=item C<fgetpos>
Use method C<IO::Seekable::getpos()> instead, or see L<perlfunc/seek>.
-=item fgets
+=item C<fgets>
Use method C<IO::Handle::gets()> instead. Similar to E<lt>E<gt>, also known
as L<perlfunc/readline>.
-=item fileno
+=item C<fileno>
Use method C<IO::Handle::fileno()> instead, or see L<perlfunc/fileno>.
-=item floor
+=item C<floor>
This is identical to the C function C<floor()>, returning the largest
integer value less than or equal to the numerical argument.
-=item fmod
+=item C<fmod>
This is identical to the C function C<fmod()>.
The C<$r> has the same sign as C<$x> and magnitude (absolute value)
less than the magnitude of C<$y>.
-=item fopen
+=item C<fopen>
Use method C<IO::File::open()> instead, or see L<perlfunc/open>.
-=item fork
+=item C<fork>
This is identical to Perl's builtin C<fork()> function
for duplicating the current process, see L<perlfunc/fork>
and L<perlfork> if you are in Windows.
-=item fpathconf
+=item C<fpathconf>
Retrieves the value of a configurable limit on a file or directory. This
uses file descriptors such as those obtained by calling C<POSIX::open>.
Returns C<undef> on failure.
-=item fprintf
+=item C<fprintf>
-fprintf() is C-specific, see L<perlfunc/printf> instead.
+C<fprintf()> is C-specific, see L<perlfunc/printf> instead.
-=item fputc
+=item C<fputc>
-fputc() is C-specific, see L<perlfunc/print> instead.
+C<fputc()> is C-specific, see L<perlfunc/print> instead.
-=item fputs
+=item C<fputs>
-fputs() is C-specific, see L<perlfunc/print> instead.
+C<fputs()> is C-specific, see L<perlfunc/print> instead.
-=item fread
+=item C<fread>
-fread() is C-specific, see L<perlfunc/read> instead.
+C<fread()> is C-specific, see L<perlfunc/read> instead.
-=item free
+=item C<free>
-free() is C-specific. Perl does memory management transparently.
+C<free()> is C-specific. Perl does memory management transparently.
-=item freopen
+=item C<freopen>
-freopen() is C-specific, see L<perlfunc/open> instead.
+C<freopen()> is C-specific, see L<perlfunc/open> instead.
-=item frexp
+=item C<frexp>
Return the mantissa and exponent of a floating-point number.
($mantissa, $exponent) = POSIX::frexp( 1.234e56 );
-=item fscanf
+=item C<fscanf>
-fscanf() is C-specific, use E<lt>E<gt> and regular expressions instead.
+C<fscanf()> is C-specific, use E<lt>E<gt> and regular expressions instead.
-=item fseek
+=item C<fseek>
Use method C<IO::Seekable::seek()> instead, or see L<perlfunc/seek>.
-=item fsetpos
+=item C<fsetpos>
Use method C<IO::Seekable::setpos()> instead, or seek L<perlfunc/seek>.
-=item fstat
+=item C<fstat>
Get file status. This uses file descriptors such as those obtained by
calling C<POSIX::open>. The data returned is identical to the data from
$fd = POSIX::open( "foo", &POSIX::O_RDONLY );
@stats = POSIX::fstat( $fd );
-=item fsync
+=item C<fsync>
Use method C<IO::Handle::sync()> instead.
-=item ftell
+=item C<ftell>
Use method C<IO::Seekable::tell()> instead, or see L<perlfunc/tell>.
-=item fwrite
+=item C<fwrite>
-fwrite() is C-specific, see L<perlfunc/print> instead.
+C<fwrite()> is C-specific, see L<perlfunc/print> instead.
-=item getc
+=item C<getc>
This is identical to Perl's builtin C<getc()> function,
see L<perlfunc/getc>.
-=item getchar
+=item C<getchar>
Returns one character from STDIN. Identical to Perl's C<getc()>,
see L<perlfunc/getc>.
-=item getcwd
+=item C<getcwd>
Returns the name of the current working directory.
See also L<Cwd>.
-=item getegid
+=item C<getegid>
Returns the effective group identifier. Similar to Perl' s builtin
variable C<$(>, see L<perlvar/$EGID>.
-=item getenv
+=item C<getenv>
Returns the value of the specified environment variable.
The same information is available through the C<%ENV> array.
-=item geteuid
+=item C<geteuid>
Returns the effective user identifier. Identical to Perl's builtin C<$E<gt>>
variable, see L<perlvar/$EUID>.
-=item getgid
+=item C<getgid>
Returns the user's real group identifier. Similar to Perl's builtin
variable C<$)>, see L<perlvar/$GID>.
-=item getgrgid
+=item C<getgrgid>
This is identical to Perl's builtin C<getgrgid()> function for
returning group entries by group identifiers, see
L<perlfunc/getgrgid>.
-=item getgrnam
+=item C<getgrnam>
This is identical to Perl's builtin C<getgrnam()> function for
returning group entries by group names, see L<perlfunc/getgrnam>.
-=item getgroups
+=item C<getgroups>
Returns the ids of the user's supplementary groups. Similar to Perl's
builtin variable C<$)>, see L<perlvar/$GID>.
-=item getlogin
+=item C<getlogin>
This is identical to Perl's builtin C<getlogin()> function for
returning the user name associated with the current session, see
L<perlfunc/getlogin>.
-=item getpgrp
+=item C<getpgrp>
This is identical to Perl's builtin C<getpgrp()> function for
returning the process group identifier of the current process, see
L<perlfunc/getpgrp>.
-=item getpid
+=item C<getpid>
Returns the process identifier. Identical to Perl's builtin
variable C<$$>, see L<perlvar/$PID>.
-=item getppid
+=item C<getppid>
This is identical to Perl's builtin C<getppid()> function for
returning the process identifier of the parent process of the current
process , see L<perlfunc/getppid>.
-=item getpwnam
+=item C<getpwnam>
This is identical to Perl's builtin C<getpwnam()> function for
returning user entries by user names, see L<perlfunc/getpwnam>.
-=item getpwuid
+=item C<getpwuid>
This is identical to Perl's builtin C<getpwuid()> function for
returning user entries by user identifiers, see L<perlfunc/getpwuid>.
-=item gets
+=item C<gets>
Returns one line from C<STDIN>, similar to E<lt>E<gt>, also known
as the C<readline()> function, see L<perlfunc/readline>.
it has no buffer overrun checks. It should B<never> be used. The
C<fgets()> function should be preferred instead.
-=item getuid
+=item C<getuid>
Returns the user's identifier. Identical to Perl's builtin C<$E<lt>> variable,
see L<perlvar/$UID>.
-=item gmtime
+=item C<gmtime>
This is identical to Perl's builtin C<gmtime()> function for
converting seconds since the epoch to a date in Greenwich Mean Time,
see L<perlfunc/gmtime>.
-=item isalnum
+=item C<isalnum>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
You may want to use the C<L<E<sol>\wE<sol>|perlrecharclass/Word
characters>> construct instead.
-=item isalpha
+=item C<isalpha>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
The function returns C<TRUE> if the input string is empty, or if the
corresponding C function returns C<TRUE> for every byte in the string.
-=item isatty
+=item C<isatty>
Returns a boolean indicating whether the specified filehandle is connected
to a tty. Similar to the C<-t> operator, see L<perlfunc/-X>.
-=item iscntrl
+=item C<iscntrl>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
The function returns C<TRUE> if the input string is empty, or if the
corresponding C function returns C<TRUE> for every byte in the string.
-=item isdigit
+=item C<isdigit>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
You may want to use the C<L<E<sol>\dE<sol>|perlrecharclass/Digits>>
construct instead.
-=item isgraph
+=item C<isgraph>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
The function returns C<TRUE> if the input string is empty, or if the
corresponding C function returns C<TRUE> for every byte in the string.
-=item islower
+=item C<islower>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
Do B<not> use C</[a-z]/> unless you don't care about the current locale.
-=item isprint
+=item C<isprint>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
The function returns C<TRUE> if the input string is empty, or if the
corresponding C function returns C<TRUE> for every byte in the string.
-=item ispunct
+=item C<ispunct>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
The function returns C<TRUE> if the input string is empty, or if the
corresponding C function returns C<TRUE> for every byte in the string.
-=item isspace
+=item C<isspace>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
You may want to use the C<L<E<sol>\sE<sol>|perlrecharclass/Whitespace>>
construct instead.
-=item isupper
+=item C<isupper>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
Do B<not> use C</[A-Z]/> unless you don't care about the current locale.
-=item isxdigit
+=item C<isxdigit>
Deprecated function whose use raises a warning, and which is slated to
be removed in a future Perl version. It is very similar to matching
The function returns C<TRUE> if the input string is empty, or if the
corresponding C function returns C<TRUE> for every byte in the string.
-=item kill
+=item C<kill>
This is identical to Perl's builtin C<kill()> function for sending
signals to processes (often to terminate them), see L<perlfunc/kill>.
-=item labs
+=item C<labs>
(For returning absolute values of long integers.)
-labs() is C-specific, see L<perlfunc/abs> instead.
+C<labs()> is C-specific, see L<perlfunc/abs> instead.
-=item lchown
+=item C<lchown>
This is identical to the C function, except the order of arguments is
consistent with Perl's builtin C<chown()> with the added restriction
C<chown()> function but changes the owner of a symbolic link instead
of the file the symbolic link points to.
-=item ldexp
+=item C<ldexp>
This is identical to the C function C<ldexp()>
for multiplying floating point numbers with powers of two.
$x_quadrupled = POSIX::ldexp($x, 2);
-=item ldiv
+=item C<ldiv>
(For computing dividends of long integers.)
-ldiv() is C-specific, use C</> and C<int()> instead.
+C<ldiv()> is C-specific, use C</> and C<int()> instead.
-=item link
+=item C<link>
This is identical to Perl's builtin C<link()> function
for creating hard links into files, see L<perlfunc/link>.
-=item localeconv
+=item C<localeconv>
Get numeric formatting information. Returns a reference to a hash
containing the current locale formatting values. Users of this function
$property, $lconv->{$property};
}
-=item localtime
+=item C<localtime>
This is identical to Perl's builtin C<localtime()> function for
converting seconds since the epoch to a date see L<perlfunc/localtime>.
-=item log
+=item C<log>
This is identical to Perl's builtin C<log()> function,
returning the natural (I<e>-based) logarithm of the numerical argument,
see L<perlfunc/log>.
-=item log10
+=item C<log10>
This is identical to the C function C<log10()>,
returning the 10-base logarithm of the numerical argument.
sub log10 { log($_[0]) * 0.434294481903252 }
-=item longjmp
+=item C<longjmp>
-longjmp() is C-specific: use L<perlfunc/die> instead.
+C<longjmp()> is C-specific: use L<perlfunc/die> instead.
-=item lseek
+=item C<lseek>
Move the file's read/write position. This uses file descriptors such as
those obtained by calling C<POSIX::open>.
Returns C<undef> on failure.
-=item malloc
+=item C<malloc>
-malloc() is C-specific. Perl does memory management transparently.
+C<malloc()> is C-specific. Perl does memory management transparently.
-=item mblen
+=item C<mblen>
This is identical to the C function C<mblen()>.
Perl does not have any support for the wide and multibyte
characters of the C standards, so this might be a rather
useless function.
-=item mbstowcs
+=item C<mbstowcs>
This is identical to the C function C<mbstowcs()>.
Perl does not have any support for the wide and multibyte
characters of the C standards, so this might be a rather
useless function.
-=item mbtowc
+=item C<mbtowc>
This is identical to the C function C<mbtowc()>.
Perl does not have any support for the wide and multibyte
characters of the C standards, so this might be a rather
useless function.
-=item memchr
+=item C<memchr>
-memchr() is C-specific, see L<perlfunc/index> instead.
+C<memchr()> is C-specific, see L<perlfunc/index> instead.
-=item memcmp
+=item C<memcmp>
-memcmp() is C-specific, use C<eq> instead, see L<perlop>.
+C<memcmp()> is C-specific, use C<eq> instead, see L<perlop>.
-=item memcpy
+=item C<memcpy>
-memcpy() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
+C<memcpy()> is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
-=item memmove
+=item C<memmove>
-memmove() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
+C<memmove()> is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
-=item memset
+=item C<memset>
-memset() is C-specific, use C<x> instead, see L<perlop>.
+C<memset()> is C-specific, use C<x> instead, see L<perlop>.
-=item mkdir
+=item C<mkdir>
This is identical to Perl's builtin C<mkdir()> function
for creating directories, see L<perlfunc/mkdir>.
-=item mkfifo
+=item C<mkfifo>
This is similar to the C function C<mkfifo()> for creating
FIFO special files.
mode of C<mkdir()>, see L<perlfunc/mkdir>, though for C<mkfifo>
you B<must> specify the C<$mode>.
-=item mktime
+=item C<mktime>
Convert date/time info to a calendar time.
Returns C<undef> on failure.
-=item modf
+=item C<modf>
Return the integral and fractional parts of a floating-point number.
($fractional, $integral) = POSIX::modf( 3.14 );
-=item nice
+=item C<nice>
This is similar to the C function C<nice()>, for changing
the scheduling preference of the current process. Positive
Returns C<undef> on failure.
-=item offsetof
+=item C<offsetof>
-offsetof() is C-specific, you probably want to see L<perlfunc/pack> instead.
+C<offsetof()> is C-specific, you probably want to see L<perlfunc/pack> instead.
-=item open
+=item C<open>
Open a file for reading for writing. This returns file descriptors, not
Perl filehandles. Use C<POSIX::close> to close the file.
See also L<perlfunc/sysopen>.
-=item opendir
+=item C<opendir>
Open a directory for reading.
Returns C<undef> on failure.
-=item pathconf
+=item C<pathconf>
Retrieves the value of a configurable limit on a file or directory.
Returns C<undef> on failure.
-=item pause
+=item C<pause>
This is similar to the C function C<pause()>, which suspends
the execution of the current process until a signal is received.
Returns C<undef> on failure.
-=item perror
+=item C<perror>
This is identical to the C function C<perror()>, which outputs to the
-standard error stream the specified message followed by ": " and the
+standard error stream the specified message followed by C<": "> and the
current error string. Use the C<warn()> function and the C<$!>
variable instead, see L<perlfunc/warn> and L<perlvar/$ERRNO>.
-=item pipe
+=item C<pipe>
Create an interprocess channel. This returns file descriptors like those
returned by C<POSIX::open>.
See also L<perlfunc/pipe>.
-=item pow
+=item C<pow>
Computes C<$x> raised to the power C<$exponent>.
You can also use the C<**> operator, see L<perlop>.
-=item printf
+=item C<printf>
Formats and prints the specified arguments to STDOUT.
See also L<perlfunc/printf>.
-=item putc
+=item C<putc>
-putc() is C-specific, see L<perlfunc/print> instead.
+C<putc()> is C-specific, see L<perlfunc/print> instead.
-=item putchar
+=item C<putchar>
-putchar() is C-specific, see L<perlfunc/print> instead.
+C<putchar()> is C-specific, see L<perlfunc/print> instead.
-=item puts
+=item C<puts>
-puts() is C-specific, see L<perlfunc/print> instead.
+C<puts()> is C-specific, see L<perlfunc/print> instead.
-=item qsort
+=item C<qsort>
-qsort() is C-specific, see L<perlfunc/sort> instead.
+C<qsort()> is C-specific, see L<perlfunc/sort> instead.
-=item raise
+=item C<raise>
Sends the specified signal to the current process.
See also L<perlfunc/kill> and the C<$$> in L<perlvar/$PID>.
-=item rand
+=item C<rand>
C<rand()> is non-portable, see L<perlfunc/rand> instead.
-=item read
+=item C<read>
Read from a file. This uses file descriptors such as those obtained by
calling C<POSIX::open>. If the buffer C<$buf> is not large enough for the
See also L<perlfunc/sysread>.
-=item readdir
+=item C<readdir>
This is identical to Perl's builtin C<readdir()> function
for reading directory entries, see L<perlfunc/readdir>.
-=item realloc
+=item C<realloc>
-realloc() is C-specific. Perl does memory management transparently.
+C<realloc()> is C-specific. Perl does memory management transparently.
-=item remove
+=item C<remove>
This is identical to Perl's builtin C<unlink()> function
for removing files, see L<perlfunc/unlink>.
-=item rename
+=item C<rename>
This is identical to Perl's builtin C<rename()> function
for renaming files, see L<perlfunc/rename>.
-=item rewind
+=item C<rewind>
Seeks to the beginning of the file.
-=item rewinddir
+=item C<rewinddir>
This is identical to Perl's builtin C<rewinddir()> function for
rewinding directory entry streams, see L<perlfunc/rewinddir>.
-=item rmdir
+=item C<rmdir>
This is identical to Perl's builtin C<rmdir()> function
for removing (empty) directories, see L<perlfunc/rmdir>.
-=item scanf
+=item C<scanf>
-scanf() is C-specific, use E<lt>E<gt> and regular expressions instead,
+C<scanf()> is C-specific, use E<lt>E<gt> and regular expressions instead,
see L<perlre>.
-=item setgid
+=item C<setgid>
Sets the real group identifier and the effective group identifier for
this process. Similar to assigning a value to the Perl's builtin
uses only a single numeric argument, as opposed to a space-separated
list of numbers.
-=item setjmp
+=item C<setjmp>
C<setjmp()> is C-specific: use C<eval {}> instead,
see L<perlfunc/eval>.
-=item setlocale
+=item C<setlocale>
Modifies and queries the program's underlying locale. Users of this
function should read L<perllocale>, whch provides a comprehensive
$loc = setlocale( LC_ALL, "C" );
-The following will query the current LC_CTYPE category. (No second
+The following will query the current C<LC_CTYPE> category. (No second
argument means 'query'.)
$loc = setlocale( LC_CTYPE );
-The following will set the LC_CTYPE behaviour according to the locale
+The following will set the C<LC_CTYPE> behaviour according to the locale
environment variables (the second argument C<"">).
Please see your system's C<setlocale(3)> documentation for the locale
environment variables' meaning or consult L<perllocale>.
$loc = setlocale( LC_CTYPE, "" );
-The following will set the LC_COLLATE behaviour to Argentinian
+The following will set the C<LC_COLLATE> behaviour to Argentinian
Spanish. B<NOTE>: The naming and availability of locales depends on
your operating system. Please consult L<perllocale> for how to find
out which locales are available in your system.
$loc = setlocale( LC_COLLATE, "es_AR.ISO8859-1" );
-=item setpgid
+=item C<setpgid>
This is similar to the C function C<setpgid()> for
setting the process group identifier of the current process.
Returns C<undef> on failure.
-=item setsid
+=item C<setsid>
This is identical to the C function C<setsid()> for
setting the session identifier of the current process.
-=item setuid
+=item C<setuid>
Sets the real user identifier and the effective user identifier for
this process. Similar to assigning a value to the Perl's builtin
C<$E<lt>> variable, see L<perlvar/$UID>, except that the latter
will change only the real user identifier.
-=item sigaction
+=item C<sigaction>
Detailed signal management. This uses C<POSIX::SigAction> objects for
the C<action> and C<oldaction> arguments (the oldaction can also be
sigaction(signal, action, oldaction = 0)
Returns C<undef> on failure. The C<signal> must be a number (like
-SIGHUP), not a string (like "SIGHUP"), though Perl does try hard
+C<SIGHUP>), not a string (like C<"SIGHUP">), though Perl does try hard
to understand you.
-If you use the SA_SIGINFO flag, the signal handler will in addition to
+If you use the C<SA_SIGINFO> flag, the signal handler will in addition to
the first argument, the signal name, also receive a second argument, a
hash reference, inside which are the following keys with the following
semantics, as defined by POSIX/SUSv3:
band band event for SIGPOLL
A third argument is also passed to the handler, which contains a copy
-of the raw binary contents of the siginfo structure: if a system has
-some non-POSIX fields, this third argument is where to unpack() them
+of the raw binary contents of the C<siginfo> structure: if a system has
+some non-POSIX fields, this third argument is where to C<unpack()> them
from.
-Note that not all siginfo values make sense simultaneously (some are
+Note that not all C<siginfo> values make sense simultaneously (some are
valid only for certain signals, for example), and not all values make
sense from Perl perspective, you should to consult your system's
C<sigaction> and possibly also C<siginfo> documentation.
-=item siglongjmp
+=item C<siglongjmp>
-siglongjmp() is C-specific: use L<perlfunc/die> instead.
+C<siglongjmp()> is C-specific: use L<perlfunc/die> instead.
-=item sigpending
+=item C<sigpending>
Examine signals that are blocked and pending. This uses C<POSIX::SigSet>
objects for the C<sigset> argument. Consult your system's C<sigpending>
Returns C<undef> on failure.
-=item sigprocmask
+=item C<sigprocmask>
Change and/or examine calling process's signal mask. This uses
C<POSIX::SigSet> objects for the C<sigset> and C<oldsigset> arguments.
handler if you're using safe signals. Other signals can be blocked or unblocked
reliably.
-=item sigsetjmp
+=item C<sigsetjmp>
C<sigsetjmp()> is C-specific: use C<eval {}> instead,
see L<perlfunc/eval>.
-=item sigsuspend
+=item C<sigsuspend>
Install a signal mask and suspend process until signal arrives. This uses
C<POSIX::SigSet> objects for the C<signal_mask> argument. Consult your
Returns C<undef> on failure.
-=item sin
+=item C<sin>
This is identical to Perl's builtin C<sin()> function
for returning the sine of the numerical argument,
see L<perlfunc/sin>. See also L<Math::Trig>.
-=item sinh
+=item C<sinh>
This is identical to the C function C<sinh()>
for returning the hyperbolic sine of the numerical argument.
See also L<Math::Trig>.
-=item sleep
+=item C<sleep>
This is functionally identical to Perl's builtin C<sleep()> function
for suspending the execution of the current for process for certain
B<unslept> seconds, while the C<CORE::sleep()> returns the
number of slept seconds.
-=item sprintf
+=item C<sprintf>
This is similar to Perl's builtin C<sprintf()> function
for returning a string that has the arguments formatted as requested,
see L<perlfunc/sprintf>.
-=item sqrt
+=item C<sqrt>
This is identical to Perl's builtin C<sqrt()> function.
for returning the square root of the numerical argument,
see L<perlfunc/sqrt>.
-=item srand
+=item C<srand>
Give a seed the pseudorandom number generator, see L<perlfunc/srand>.
-=item sscanf
+=item C<sscanf>
-sscanf() is C-specific, use regular expressions instead,
+C<sscanf()> is C-specific, use regular expressions instead,
see L<perlre>.
-=item stat
+=item C<stat>
This is identical to Perl's builtin C<stat()> function
for returning information about files and directories.
-=item strcat
+=item C<strcat>
-strcat() is C-specific, use C<.=> instead, see L<perlop>.
+C<strcat()> is C-specific, use C<.=> instead, see L<perlop>.
-=item strchr
+=item C<strchr>
-strchr() is C-specific, see L<perlfunc/index> instead.
+C<strchr()> is C-specific, see L<perlfunc/index> instead.
-=item strcmp
+=item C<strcmp>
-strcmp() is C-specific, use C<eq> or C<cmp> instead, see L<perlop>.
+C<strcmp()> is C-specific, use C<eq> or C<cmp> instead, see L<perlop>.
-=item strcoll
+=item C<strcoll>
This is identical to the C function C<strcoll()>
for collating (comparing) strings transformed using
the C<strxfrm()> function. Not really needed since
Perl can do this transparently, see L<perllocale>.
-=item strcpy
+=item C<strcpy>
-strcpy() is C-specific, use C<=> instead, see L<perlop>.
+C<strcpy()> is C-specific, use C<=> instead, see L<perlop>.
-=item strcspn
+=item C<strcspn>
-strcspn() is C-specific, use regular expressions instead,
+C<strcspn()> is C-specific, use regular expressions instead,
see L<perlre>.
-=item strerror
+=item C<strerror>
Returns the error string for the specified errno.
Identical to the string form of the C<$!>, see L<perlvar/$ERRNO>.
-=item strftime
+=item C<strftime>
Convert date and time information to string. Returns the string.
0, 0, 0, 12, 11, 95, 2 );
print "$str\n";
-=item strlen
+=item C<strlen>
-strlen() is C-specific, use C<length()> instead, see L<perlfunc/length>.
+C<strlen()> is C-specific, use C<length()> instead, see L<perlfunc/length>.
-=item strncat
+=item C<strncat>
-strncat() is C-specific, use C<.=> instead, see L<perlop>.
+C<strncat()> is C-specific, use C<.=> instead, see L<perlop>.
-=item strncmp
+=item C<strncmp>
-strncmp() is C-specific, use C<eq> instead, see L<perlop>.
+C<strncmp()> is C-specific, use C<eq> instead, see L<perlop>.
-=item strncpy
+=item C<strncpy>
-strncpy() is C-specific, use C<=> instead, see L<perlop>.
+C<strncpy()> is C-specific, use C<=> instead, see L<perlop>.
-=item strpbrk
+=item C<strpbrk>
-strpbrk() is C-specific, use regular expressions instead,
+C<strpbrk()> is C-specific, use regular expressions instead,
see L<perlre>.
-=item strrchr
+=item C<strrchr>
-strrchr() is C-specific, see L<perlfunc/rindex> instead.
+C<strrchr()> is C-specific, see L<perlfunc/rindex> instead.
-=item strspn
+=item C<strspn>
-strspn() is C-specific, use regular expressions instead,
+C<strspn()> is C-specific, use regular expressions instead,
see L<perlre>.
-=item strstr
+=item C<strstr>
This is identical to Perl's builtin C<index()> function,
see L<perlfunc/index>.
-=item strtod
+=item C<strtod>
String to double translation. Returns the parsed number and the number
of characters in the unparsed portion of the string. Truly
-POSIX-compliant systems set $! ($ERRNO) to indicate a translation
-error, so clear $! before calling strtod. However, non-POSIX systems
-may not check for overflow, and therefore will never set $!.
+POSIX-compliant systems set C<$!> (C<$ERRNO>) to indicate a translation
+error, so clear C<$!> before calling strtod. However, non-POSIX systems
+may not check for overflow, and therefore will never set C<$!>.
-strtod should respect any POSIX I<setlocale()> settings.
+strtod respects any POSIX I<setlocale()> settings.
-To parse a string $str as a floating point number use
+To parse a string C<$str> as a floating point number use
$! = 0;
($num, $n_unparsed) = POSIX::strtod($str);
-The second returned item and $! can be used to check for valid input:
+The second returned item and C<$!> can be used to check for valid input:
if (($str eq '') || ($n_unparsed != 0) || $!) {
die "Non-numeric input $str" . ($! ? ": $!\n" : "\n");
When called in a scalar context strtod returns the parsed number.
-=item strtok
+=item C<strtok>
-strtok() is C-specific, use regular expressions instead, see
+C<strtok()> is C-specific, use regular expressions instead, see
L<perlre>, or L<perlfunc/split>.
-=item strtol
+=item C<strtol>
String to (long) integer translation. Returns the parsed number and
the number of characters in the unparsed portion of the string. Truly
-POSIX-compliant systems set $! ($ERRNO) to indicate a translation
-error, so clear $! before calling strtol. However, non-POSIX systems
-may not check for overflow, and therefore will never set $!.
+POSIX-compliant systems set C<$!> (C<$ERRNO>) to indicate a translation
+error, so clear C<$!> before calling C<strtol>. However, non-POSIX systems
+may not check for overflow, and therefore will never set C<$!>.
-strtol should respect any POSIX I<setlocale()> settings.
+C<strtol> should respect any POSIX I<setlocale()> settings.
-To parse a string $str as a number in some base $base use
+To parse a string C<$str> as a number in some base C<$base> use
$! = 0;
($num, $n_unparsed) = POSIX::strtol($str, $base);
parsed as a decimal number, "01234" as an octal number, and "0x1234"
as a hexadecimal number.
-The second returned item and $! can be used to check for valid input:
+The second returned item and C<$!> can be used to check for valid input:
if (($str eq '') || ($n_unparsed != 0) || !$!) {
die "Non-numeric input $str" . $! ? ": $!\n" : "\n";
When called in a scalar context strtol returns the parsed number.
-=item strtoul
+=item C<strtoul>
-String to unsigned (long) integer translation. strtoul() is identical
-to strtol() except that strtoul() only parses unsigned integers. See
+String to unsigned (long) integer translation. C<strtoul()> is identical
+to C<strtol()> except that C<strtoul()> only parses unsigned integers. See
L</strtol> for details.
-Note: Some vendors supply strtod() and strtol() but not strtoul().
-Other vendors that do supply strtoul() parse "-1" as a valid value.
+Note: Some vendors supply C<strtod()> and C<strtol()> but not C<strtoul()>.
+Other vendors that do supply C<strtoul()> parse "-1" as a valid value.
-=item strxfrm
+=item C<strxfrm>
String transformation. Returns the transformed string.
Not really needed since Perl can do this transparently, see
L<perllocale>.
-=item sysconf
+=item C<sysconf>
Retrieves values of system configurable variables.
Returns C<undef> on failure.
-=item system
+=item C<system>
This is identical to Perl's builtin C<system()> function, see
L<perlfunc/system>.
-=item tan
+=item C<tan>
This is identical to the C function C<tan()>, returning the
tangent of the numerical argument. See also L<Math::Trig>.
-=item tanh
+=item C<tanh>
This is identical to the C function C<tanh()>, returning the
hyperbolic tangent of the numerical argument. See also L<Math::Trig>.
-=item tcdrain
+=item C<tcdrain>
This is similar to the C function C<tcdrain()> for draining
the output queue of its argument stream.
Returns C<undef> on failure.
-=item tcflow
+=item C<tcflow>
This is similar to the C function C<tcflow()> for controlling
the flow of its argument stream.
Returns C<undef> on failure.
-=item tcflush
+=item C<tcflush>
This is similar to the C function C<tcflush()> for flushing
the I/O buffers of its argument stream.
Returns C<undef> on failure.
-=item tcgetpgrp
+=item C<tcgetpgrp>
This is identical to the C function C<tcgetpgrp()> for returning the
process group identifier of the foreground process group of the controlling
terminal.
-=item tcsendbreak
+=item C<tcsendbreak>
This is similar to the C function C<tcsendbreak()> for sending
a break on its argument stream.
Returns C<undef> on failure.
-=item tcsetpgrp
+=item C<tcsetpgrp>
This is similar to the C function C<tcsetpgrp()> for setting the
process group identifier of the foreground process group of the controlling
Returns C<undef> on failure.
-=item time
+=item C<time>
This is identical to Perl's builtin C<time()> function
for returning the number of seconds since the epoch
(whatever it is for the system), see L<perlfunc/time>.
-=item times
+=item C<times>
-The times() function returns elapsed realtime since some point in the past
+The C<times()> function 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 used by child processes. All times are returned in clock
ticks.
Note: Perl's builtin C<times()> function returns four values, measured in
seconds.
-=item tmpfile
+=item C<tmpfile>
Use method C<IO::File::new_tmpfile()> instead, or see L<File::Temp>.
-=item tmpnam
+=item C<tmpnam>
Returns a name for a temporary file.
$tmpfile = POSIX::tmpnam();
For security reasons, which are probably detailed in your system's
-documentation for the C library tmpnam() function, this interface
+documentation for the C library C<tmpnam()> function, this interface
should not be used; instead see L<File::Temp>.
-=item tolower
+=item C<tolower>
This is identical to the C function, except that it can apply to a single
character or to a whole string. Consider using the C<lc()> function,
see L<perlfunc/lc>, or the equivalent C<\L> operator inside doublequotish
strings.
-=item toupper
+=item C<toupper>
This is identical to the C function, except that it can apply to a single
character or to a whole string. Consider using the C<uc()> function,
see L<perlfunc/uc>, or the equivalent C<\U> operator inside doublequotish
strings.
-=item ttyname
+=item C<ttyname>
This is identical to the C function C<ttyname()> for returning the
name of the current terminal.
-=item tzname
+=item C<tzname>
Retrieves the time conversion information from the C<tzname> variable.
POSIX::tzset();
($std, $dst) = POSIX::tzname();
-=item tzset
+=item C<tzset>
This is identical to the C function C<tzset()> for setting
the current timezone based on the environment variable C<TZ>,
to be used by C<ctime()>, C<localtime()>, C<mktime()>, and C<strftime()>
functions.
-=item umask
+=item C<umask>
This is identical to Perl's builtin C<umask()> function
for setting (and querying) the file creation permission mask,
see L<perlfunc/umask>.
-=item uname
+=item C<uname>
Get name of current operating system.
operating system, and the C<$machine> might be a hardware identifier.
Maybe.
-=item ungetc
+=item C<ungetc>
Use method C<IO::Handle::ungetc()> instead.
-=item unlink
+=item C<unlink>
This is identical to Perl's builtin C<unlink()> function
for removing files, see L<perlfunc/unlink>.
-=item utime
+=item C<utime>
This is identical to Perl's builtin C<utime()> function
for changing the time stamps of files and directories,
see L<perlfunc/utime>.
-=item vfprintf
+=item C<vfprintf>
-vfprintf() is C-specific, see L<perlfunc/printf> instead.
+C<vfprintf()> is C-specific, see L<perlfunc/printf> instead.
-=item vprintf
+=item C<vprintf>
-vprintf() is C-specific, see L<perlfunc/printf> instead.
+C<vprintf()> is C-specific, see L<perlfunc/printf> instead.
-=item vsprintf
+=item C<vsprintf>
-vsprintf() is C-specific, see L<perlfunc/sprintf> instead.
+C<vsprintf()> is C-specific, see L<perlfunc/sprintf> instead.
-=item wait
+=item C<wait>
This is identical to Perl's builtin C<wait()> function,
see L<perlfunc/wait>.
-=item waitpid
+=item C<waitpid>
Wait for a child process to change state. This is identical to Perl's
builtin C<waitpid()> function, see L<perlfunc/waitpid>.
$pid = POSIX::waitpid( -1, POSIX::WNOHANG );
print "status = ", ($? / 256), "\n";
-=item wcstombs
+=item C<wcstombs>
This is identical to the C function C<wcstombs()>.
Perl does not have any support for the wide and multibyte
characters of the C standards, so this might be a rather
useless function.
-=item wctomb
+=item C<wctomb>
This is identical to the C function C<wctomb()>.
Perl does not have any support for the wide and multibyte
characters of the C standards, so this might be a rather
useless function.
-=item write
+=item C<write>
Write to a file. This uses file descriptors such as those obtained by
calling C<POSIX::open>.
=head1 CLASSES
-=head2 POSIX::SigAction
+=head2 C<POSIX::SigAction>
=over 8
-=item new
+=item C<new>
Creates a new C<POSIX::SigAction> object which corresponds to the C
C<struct sigaction>. This object will be destroyed automatically when
=over 8
-=item handler
+=item C<handler>
-=item mask
+=item C<mask>
-=item flags
+=item C<flags>
accessor functions to get/set the values of a SigAction object.
$sigset = $sigaction->mask;
$sigaction->flags(&POSIX::SA_RESTART);
-=item safe
+=item C<safe>
accessor function for the "safe signals" flag of a SigAction object; see
L<perlipc> for general information on safe (a.k.a. "deferred") signals. If
=back
-=head2 POSIX::SigRt
+=head2 C<POSIX::SigRt>
=over 8
-=item %SIGRT
+=item C<%SIGRT>
A hash of the POSIX realtime signal handlers. It is an extension of
-the standard %SIG, the $POSIX::SIGRT{SIGRTMIN} is roughly equivalent
-to $SIG{SIGRTMIN}, but the right POSIX moves (see below) are made with
-the POSIX::SigSet and POSIX::sigaction instead of accessing the %SIG.
+the standard C<%SIG>, the C<$POSIX::SIGRT{SIGRTMIN}> is roughly equivalent
+to C<$SIG{SIGRTMIN}>, but the right POSIX moves (see below) are made with
+the C<POSIX::SigSet> and C<POSIX::sigaction> instead of accessing the C<%SIG>.
-You can set the %POSIX::SIGRT elements to set the POSIX realtime
+You can set the C<%POSIX::SIGRT> elements to set the POSIX realtime
signal handlers, use C<delete> and C<exists> on the elements, and use
C<scalar> on the C<%POSIX::SIGRT> to find out how many POSIX realtime
-signals there are available (SIGRTMAX - SIGRTMIN + 1, the SIGRTMAX is
+signals there are available S<C<(SIGRTMAX - SIGRTMIN + 1>>, the C<SIGRTMAX> is
a valid POSIX realtime signal).
-Setting the %SIGRT elements is equivalent to calling this:
+Setting the C<%SIGRT> elements is equivalent to calling this:
sub new {
my ($rtsig, $handler, $flags) = @_;
}
The flags default to zero, if you want something different you can
-either use C<local> on $POSIX::SigRt::SIGACTION_FLAGS, or you can
+either use C<local> on C<$POSIX::SigRt::SIGACTION_FLAGS>, or you can
derive from POSIX::SigRt and define your own C<new()> (the tied hash
-STORE method of the %SIGRT calls C<new($rtsig, $handler, $SIGACTION_FLAGS)>,
-where the $rtsig ranges from zero to SIGRTMAX - SIGRTMIN + 1).
+STORE method of the C<%SIGRT> calls C<new($rtsig, $handler, $SIGACTION_FLAGS)>,
+where the C<$rtsig> ranges from zero to S<C<SIGRTMAX - SIGRTMIN + 1)>>.
-Just as with any signal, you can use sigaction($rtsig, undef, $oa) to
+Just as with any signal, you can use C<sigaction($rtsig, undef, $oa)> to
retrieve the installed signal handler (or, rather, the signal action).
B<NOTE:> whether POSIX realtime signals really work in your system, or
whether Perl has been compiled so that it works with them, is outside
of this discussion.
-=item SIGRTMIN
+=item C<SIGRTMIN>
Return the minimum POSIX realtime signal number available, or C<undef>
if no POSIX realtime signals are available.
-=item SIGRTMAX
+=item C<SIGRTMAX>
Return the maximum POSIX realtime signal number available, or C<undef>
if no POSIX realtime signals are available.
=back
-=head2 POSIX::SigSet
+=head2 C<POSIX::SigSet>
=over 8
-=item new
+=item C<new>
Create a new SigSet object. This object will be destroyed automatically
when it is no longer needed. Arguments may be supplied to initialize the
$sigset = POSIX::SigSet->new;
-Create a set with SIGUSR1.
+Create a set with C<SIGUSR1>.
$sigset = POSIX::SigSet->new( &POSIX::SIGUSR1 );
-=item addset
+=item C<addset>
Add a signal to a SigSet object.
Returns C<undef> on failure.
-=item delset
+=item C<delset>
Remove a signal from the SigSet object.
Returns C<undef> on failure.
-=item emptyset
+=item C<emptyset>
Initialize the SigSet object to be empty.
Returns C<undef> on failure.
-=item fillset
+=item C<fillset>
Initialize the SigSet object to include all signals.
Returns C<undef> on failure.
-=item ismember
+=item C<ismember>
Tests the SigSet object to see if it contains a specific signal.
=back
-=head2 POSIX::Termios
+=head2 C<POSIX::Termios>
=over 8
-=item new
+=item C<new>
Create a new Termios object. This object will be destroyed automatically
when it is no longer needed. A Termios object corresponds to the termios
-C struct. new() mallocs a new one, getattr() fills it from a file descriptor,
-and setattr() sets a file descriptor's parameters to match Termios' contents.
+C struct. C<new()> mallocs a new one, C<getattr()> fills it from a file descriptor,
+and C<setattr()> sets a file descriptor's parameters to match Termios' contents.
$termios = POSIX::Termios->new;
-=item getattr
+=item C<getattr>
Get terminal control attributes.
Returns C<undef> on failure.
-=item getcc
+=item C<getcc>
Retrieve 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(1);
-=item getcflag
+=item C<getcflag>
Retrieve the c_cflag field of a termios object.
$c_cflag = $termios->getcflag;
-=item getiflag
+=item C<getiflag>
Retrieve the c_iflag field of a termios object.
$c_iflag = $termios->getiflag;
-=item getispeed
+=item C<getispeed>
Retrieve the input baud rate.
$ispeed = $termios->getispeed;
-=item getlflag
+=item C<getlflag>
Retrieve the c_lflag field of a termios object.
$c_lflag = $termios->getlflag;
-=item getoflag
+=item C<getoflag>
Retrieve the c_oflag field of a termios object.
$c_oflag = $termios->getoflag;
-=item getospeed
+=item C<getospeed>
Retrieve the output baud rate.
$ospeed = $termios->getospeed;
-=item setattr
+=item C<setattr>
Set terminal control attributes.
Returns C<undef> on failure.
-=item setcc
+=item C<setcc>
Set 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, 1 );
-=item setcflag
+=item C<setcflag>
Set the c_cflag field of a termios object.
$termios->setcflag( $c_cflag | &POSIX::CLOCAL );
-=item setiflag
+=item C<setiflag>
Set the c_iflag field of a termios object.
$termios->setiflag( $c_iflag | &POSIX::BRKINT );
-=item setispeed
+=item C<setispeed>
Set the input baud rate.
Returns C<undef> on failure.
-=item setlflag
+=item C<setlflag>
Set the c_lflag field of a termios object.
$termios->setlflag( $c_lflag | &POSIX::ECHO );
-=item setoflag
+=item C<setoflag>
Set the c_oflag field of a termios object.
$termios->setoflag( $c_oflag | &POSIX::OPOST );
-=item setospeed
+=item C<setospeed>
Set the output baud rate.
=item Baud rate values
-B38400 B75 B200 B134 B300 B1800 B150 B0 B19200 B1200 B9600 B600 B4800 B50 B2400 B110
+C<B38400> C<B75> C<B200> C<B134> C<B300> C<B1800> C<B150> C<B0> C<B19200> C<B1200> C<B9600> C<B600> C<B4800> C<B50> C<B2400> C<B110>
=item Terminal interface values
-TCSADRAIN TCSANOW TCOON TCIOFLUSH TCOFLUSH TCION TCIFLUSH TCSAFLUSH TCIOFF TCOOFF
+C<TCSADRAIN> C<TCSANOW> C<TCOON> C<TCIOFLUSH> C<TCOFLUSH> C<TCION> C<TCIFLUSH> C<TCSAFLUSH> C<TCIOFF> C<TCOOFF>
-=item c_cc field values
+=item C<c_cc> field values
-VEOF VEOL VERASE VINTR VKILL VQUIT VSUSP VSTART VSTOP VMIN VTIME NCCS
+C<VEOF> C<VEOL> C<VERASE> C<VINTR> C<VKILL> C<VQUIT> C<VSUSP> C<VSTART> C<VSTOP> C<VMIN> C<VTIME> C<NCCS>
-=item c_cflag field values
+=item C<c_cflag> field values
-CLOCAL CREAD CSIZE CS5 CS6 CS7 CS8 CSTOPB HUPCL PARENB PARODD
+C<CLOCAL> C<CREAD> C<CSIZE> C<CS5> C<CS6> C<CS7> C<CS8> C<CSTOPB> C<HUPCL> C<PARENB> C<PARODD>
-=item c_iflag field values
+=item C<c_iflag> field values
-BRKINT ICRNL IGNBRK IGNCR IGNPAR INLCR INPCK ISTRIP IXOFF IXON PARMRK
+C<BRKINT> C<ICRNL> C<IGNBRK> C<IGNCR> C<IGNPAR> C<INLCR> C<INPCK> C<ISTRIP> C<IXOFF> C<IXON> C<PARMRK>
-=item c_lflag field values
+=item C<c_lflag> field values
-ECHO ECHOE ECHOK ECHONL ICANON IEXTEN ISIG NOFLSH TOSTOP
+C<ECHO> C<ECHOE> C<ECHOK> C<ECHONL> C<ICANON> C<IEXTEN> C<ISIG> C<NOFLSH> C<TOSTOP>
-=item c_oflag field values
+=item C<c_oflag> field values
-OPOST
+C<OPOST>
=back
=item Constants
-_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
+C<_PC_CHOWN_RESTRICTED> C<_PC_LINK_MAX> C<_PC_MAX_CANON> C<_PC_MAX_INPUT> C<_PC_NAME_MAX>
+C<_PC_NO_TRUNC> C<_PC_PATH_MAX> C<_PC_PIPE_BUF> C<_PC_VDISABLE>
=back
=item Constants
-_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
+C<_POSIX_ARG_MAX> C<_POSIX_CHILD_MAX> C<_POSIX_CHOWN_RESTRICTED> C<_POSIX_JOB_CONTROL>
+C<_POSIX_LINK_MAX> C<_POSIX_MAX_CANON> C<_POSIX_MAX_INPUT> C<_POSIX_NAME_MAX>
+C<_POSIX_NGROUPS_MAX> C<_POSIX_NO_TRUNC> C<_POSIX_OPEN_MAX> C<_POSIX_PATH_MAX>
+C<_POSIX_PIPE_BUF> C<_POSIX_SAVED_IDS> C<_POSIX_SSIZE_MAX> C<_POSIX_STREAM_MAX>
+C<_POSIX_TZNAME_MAX> C<_POSIX_VDISABLE> C<_POSIX_VERSION>
=back
=item Constants
-_SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL _SC_NGROUPS_MAX
-_SC_OPEN_MAX _SC_PAGESIZE _SC_SAVED_IDS _SC_STREAM_MAX _SC_TZNAME_MAX
-_SC_VERSION
+C<_SC_ARG_MAX> C<_SC_CHILD_MAX> C<_SC_CLK_TCK> C<_SC_JOB_CONTROL> C<_SC_NGROUPS_MAX>
+C<_SC_OPEN_MAX> C<_SC_PAGESIZE> C<_SC_SAVED_IDS> C<_SC_STREAM_MAX> C<_SC_TZNAME_MAX>
+C<_SC_VERSION>
=back
=item Constants
-E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF EBADMSG
-EBUSY ECANCELED ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ
-EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EIDRM EILSEQ EINPROGRESS
-EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE ENAMETOOLONG
-ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA ENODEV ENOENT ENOEXEC
-ENOLCK ENOLINK ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR ENOSTR ENOSYS ENOTBLK
-ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP ENOTTY ENXIO
-EOPNOTSUPP EOTHER EOVERFLOW EOWNERDEAD EPERM EPFNOSUPPORT EPIPE EPROCLIM EPROTO
-EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART EROFS ESHUTDOWN
-ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIME ETIMEDOUT ETOOMANYREFS ETXTBSY EUSERS
-EWOULDBLOCK EXDEV
+C<E2BIG> C<EACCES> C<EADDRINUSE> C<EADDRNOTAVAIL> C<EAFNOSUPPORT> C<EAGAIN> C<EALREADY> C<EBADF> C<EBADMSG>
+C<EBUSY> C<ECANCELED> C<ECHILD> C<ECONNABORTED> C<ECONNREFUSED> C<ECONNRESET> C<EDEADLK> C<EDESTADDRREQ>
+C<EDOM> C<EDQUOT> C<EEXIST> C<EFAULT> C<EFBIG> C<EHOSTDOWN> C<EHOSTUNREACH> C<EIDRM> C<EILSEQ> C<EINPROGRESS>
+C<EINTR> C<EINVAL> C<EIO> C<EISCONN> C<EISDIR> C<ELOOP> C<EMFILE> C<EMLINK> C<EMSGSIZE> C<ENAMETOOLONG>
+C<ENETDOWN> C<ENETRESET> C<ENETUNREACH> C<ENFILE> C<ENOBUFS> C<ENODATA> C<ENODEV> C<ENOENT> C<ENOEXEC>
+C<ENOLCK> C<ENOLINK> C<ENOMEM> C<ENOMSG> C<ENOPROTOOPT> C<ENOSPC> C<ENOSR> C<ENOSTR> C<ENOSYS> C<ENOTBLK>
+C<ENOTCONN> C<ENOTDIR> C<ENOTEMPTY> C<ENOTRECOVERABLE> C<ENOTSOCK> C<ENOTSUP> C<ENOTTY> C<ENXIO>
+C<EOPNOTSUPP> C<EOTHER> C<EOVERFLOW> C<EOWNERDEAD> C<EPERM> C<EPFNOSUPPORT> C<EPIPE> C<EPROCLIM> C<EPROTO>
+C<EPROTONOSUPPORT> C<EPROTOTYPE> C<ERANGE> C<EREMOTE> C<ERESTART> C<EROFS> C<ESHUTDOWN>
+C<ESOCKTNOSUPPORT> C<ESPIPE> C<ESRCH> C<ESTALE> C<ETIME> C<ETIMEDOUT> C<ETOOMANYREFS> C<ETXTBSY> C<EUSERS>
+C<EWOULDBLOCK> C<EXDEV>
=back
=item Constants
-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
+C<FD_CLOEXEC> C<F_DUPFD> C<F_GETFD> C<F_GETFL> C<F_GETLK> C<F_OK> C<F_RDLCK> C<F_SETFD> C<F_SETFL> C<F_SETLK>
+C<F_SETLKW> C<F_UNLCK> C<F_WRLCK> C<O_ACCMODE> C<O_APPEND> C<O_CREAT> C<O_EXCL> C<O_NOCTTY> C<O_NONBLOCK>
+C<O_RDONLY> C<O_RDWR> C<O_TRUNC> C<O_WRONLY>
=back
=item Constants
-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
+C<DBL_DIG> C<DBL_EPSILON> C<DBL_MANT_DIG> C<DBL_MAX> C<DBL_MAX_10_EXP> C<DBL_MAX_EXP> C<DBL_MIN>
+C<DBL_MIN_10_EXP> C<DBL_MIN_EXP> C<FLT_DIG> C<FLT_EPSILON> C<FLT_MANT_DIG> C<FLT_MAX>
+C<FLT_MAX_10_EXP> C<FLT_MAX_EXP> C<FLT_MIN> C<FLT_MIN_10_EXP> C<FLT_MIN_EXP> C<FLT_RADIX>
+C<FLT_ROUNDS> C<LDBL_DIG> C<LDBL_EPSILON> C<LDBL_MANT_DIG> C<LDBL_MAX> C<LDBL_MAX_10_EXP>
+C<LDBL_MAX_EXP> C<LDBL_MIN> C<LDBL_MIN_10_EXP> C<LDBL_MIN_EXP>
=back
=item Constants
-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
+C<ARG_MAX> C<CHAR_BIT> C<CHAR_MAX> C<CHAR_MIN> C<CHILD_MAX> C<INT_MAX> C<INT_MIN> C<LINK_MAX> C<LONG_MAX>
+C<LONG_MIN> C<MAX_CANON> C<MAX_INPUT> C<MB_LEN_MAX> C<NAME_MAX> C<NGROUPS_MAX> C<OPEN_MAX> C<PATH_MAX>
+C<PIPE_BUF> C<SCHAR_MAX> C<SCHAR_MIN> C<SHRT_MAX> C<SHRT_MIN> C<SSIZE_MAX> C<STREAM_MAX> C<TZNAME_MAX>
+C<UCHAR_MAX> C<UINT_MAX> C<ULONG_MAX> C<USHRT_MAX>
=back
=item Constants
-LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME
+C<LC_ALL> C<LC_COLLATE> C<LC_CTYPE> C<LC_MONETARY> C<LC_NUMERIC> C<LC_TIME>
=back
=item Constants
-HUGE_VAL
+C<HUGE_VAL>
=back
=item Constants
-SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND SA_RESTART
-SA_SIGINFO 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
+C<SA_NOCLDSTOP> C<SA_NOCLDWAIT> C<SA_NODEFER> C<SA_ONSTACK> C<SA_RESETHAND> C<SA_RESTART>
+C<SA_SIGINFO> C<SIGABRT> C<SIGALRM> C<SIGCHLD> C<SIGCONT> C<SIGFPE> C<SIGHUP> C<SIGILL> C<SIGINT>
+C<SIGKILL> C<SIGPIPE> C<SIGQUIT> C<SIGSEGV> C<SIGSTOP> C<SIGTERM> C<SIGTSTP> C<SIGTTIN> C<SIGTTOU>
+C<SIGUSR1> C<SIGUSR2> C<SIG_BLOCK> C<SIG_DFL> C<SIG_ERR> C<SIG_IGN> C<SIG_SETMASK>
+C<SIG_UNBLOCK>
=back
=item Constants
-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
+C<S_IRGRP> C<S_IROTH> C<S_IRUSR> C<S_IRWXG> C<S_IRWXO> C<S_IRWXU> C<S_ISGID> C<S_ISUID> C<S_IWGRP> C<S_IWOTH>
+C<S_IWUSR> C<S_IXGRP> C<S_IXOTH> C<S_IXUSR>
=item Macros
-S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
+C<S_ISBLK> C<S_ISCHR> C<S_ISDIR> C<S_ISFIFO> C<S_ISREG>
=back
=item Constants
-EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX RAND_MAX
+C<EXIT_FAILURE> C<EXIT_SUCCESS> C<MB_CUR_MAX> C<RAND_MAX>
=back
=item Constants
-BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid L_tmpname TMP_MAX
+C<BUFSIZ> C<EOF> C<FILENAME_MAX> C<L_ctermid> C<L_cuserid> C<L_tmpname> C<TMP_MAX>
=back
=item Constants
-CLK_TCK CLOCKS_PER_SEC
+C<CLK_TCK> C<CLOCKS_PER_SEC>
=back
=item Constants
-R_OK SEEK_CUR SEEK_END SEEK_SET STDIN_FILENO STDOUT_FILENO STDERR_FILENO W_OK X_OK
+C<R_OK> C<SEEK_CUR> C<SEEK_END> C<SEEK_SET> C<STDIN_FILENO> C<STDOUT_FILENO> C<STDERR_FILENO> C<W_OK> C<X_OK>
=back
=item Constants
-WNOHANG WUNTRACED
+C<WNOHANG> C<WUNTRACED>
=over 16
-=item WNOHANG
+=item C<WNOHANG>
Do not suspend the calling process until a child process
changes state but instead return immediately.
-=item WUNTRACED
+=item C<WUNTRACED>
Catch stopped child processes.
=item Macros
-WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG WIFSTOPPED WSTOPSIG
+C<WIFEXITED> C<WEXITSTATUS> C<WIFSIGNALED> C<WTERMSIG> C<WIFSTOPPED> C<WSTOPSIG>
=over 16
-=item WIFEXITED
+=item C<WIFEXITED>
-WIFEXITED(${^CHILD_ERROR_NATIVE}) returns true if the child process
+C<WIFEXITED(${^CHILD_ERROR_NATIVE})> returns true if the child process
exited normally (C<exit()> or by falling off the end of C<main()>)
-=item WEXITSTATUS
+=item C<WEXITSTATUS>
-WEXITSTATUS(${^CHILD_ERROR_NATIVE}) returns the normal exit status of
-the child process (only meaningful if WIFEXITED(${^CHILD_ERROR_NATIVE})
+C<WEXITSTATUS(${^CHILD_ERROR_NATIVE})> returns the normal exit status of
+the child process (only meaningful if C<WIFEXITED(${^CHILD_ERROR_NATIVE})>
is true)
-=item WIFSIGNALED
+=item C<WIFSIGNALED>
-WIFSIGNALED(${^CHILD_ERROR_NATIVE}) returns true if the child process
+C<WIFSIGNALED(${^CHILD_ERROR_NATIVE})> returns true if the child process
terminated because of a signal
-=item WTERMSIG
+=item C<WTERMSIG>
-WTERMSIG(${^CHILD_ERROR_NATIVE}) returns the signal the child process
-terminated for (only meaningful if WIFSIGNALED(${^CHILD_ERROR_NATIVE})
+C<WTERMSIG(${^CHILD_ERROR_NATIVE})> returns the signal the child process
+terminated for (only meaningful if
+C<WIFSIGNALED(${^CHILD_ERROR_NATIVE})>
is true)
-=item WIFSTOPPED
+=item C<WIFSTOPPED>
-WIFSTOPPED(${^CHILD_ERROR_NATIVE}) returns true if the child process is
+C<WIFSTOPPED(${^CHILD_ERROR_NATIVE})> returns true if the child process is
currently stopped (can happen only if you specified the WUNTRACED flag
-to waitpid())
+to C<waitpid()>)
-=item WSTOPSIG
+=item C<WSTOPSIG>
-WSTOPSIG(${^CHILD_ERROR_NATIVE}) returns the signal the child process
-was stopped for (only meaningful if WIFSTOPPED(${^CHILD_ERROR_NATIVE})
+C<WSTOPSIG(${^CHILD_ERROR_NATIVE})> returns the signal the child process
+was stopped for (only meaningful if
+C<WIFSTOPPED(${^CHILD_ERROR_NATIVE})>
is true)
=back