1N/A=head1 NAME
1N/A
1N/APOSIX - Perl interface to IEEE Std 1003.1
1N/A
1N/A=head1 SYNOPSIS
1N/A
1N/A use POSIX;
1N/A use POSIX qw(setsid);
1N/A use POSIX qw(:errno_h :fcntl_h);
1N/A
1N/A printf "EINTR is %d\n", EINTR;
1N/A
1N/A $sess_id = POSIX::setsid();
1N/A
1N/A $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644);
1N/A # note: that's a filedescriptor, *NOT* a filehandle
1N/A
1N/A=head1 DESCRIPTION
1N/A
1N/AThe POSIX module permits you to access all (or nearly all) the standard
1N/APOSIX 1003.1 identifiers. Many of these identifiers have been given Perl-ish
1N/Ainterfaces.
1N/A
1N/AI<Everything is exported by default> with the exception of any POSIX
1N/Afunctions with the same name as a built-in Perl function, such as
1N/AC<abs>, C<alarm>, C<rmdir>, C<write>, etc.., which will be exported
1N/Aonly if you ask for them explicitly. This is an unfortunate backwards
1N/Acompatibility feature. You can stop the exporting by saying C<use
1N/APOSIX ()> and then use the fully qualified names (ie. C<POSIX::SEEK_END>).
1N/A
1N/AThis document gives a condensed list of the features available in the POSIX
1N/Amodule. Consult your operating system's manpages for general information on
1N/Amost features. Consult L<perlfunc> for functions which are noted as being
1N/Aidentical to Perl's builtin functions.
1N/A
1N/AThe first section describes POSIX functions from the 1003.1 specification.
1N/AThe second section describes some classes for signal objects, TTY objects,
1N/Aand other miscellaneous objects. The remaining sections list various
1N/Aconstants and macros in an organization which roughly follows IEEE Std
1N/A1003.1b-1993.
1N/A
1N/A=head1 NOTE
1N/A
1N/AThe POSIX module is probably the most complex Perl module supplied with
1N/Athe standard distribution. It incorporates autoloading, namespace games,
1N/Aand dynamic loading of code that's in Perl, C, or both. It's a great
1N/Asource of wisdom.
1N/A
1N/A=head1 CAVEATS
1N/A
1N/AA few functions are not implemented because they are C specific. If you
1N/Aattempt to call these, they will print a message telling you that they
1N/Aaren't implemented, and suggest using the Perl equivalent should one
1N/Aexist. For example, trying to access the setjmp() call will elicit the
1N/Amessage "setjmp() is C-specific: use eval {} instead".
1N/A
1N/AFurthermore, some evil vendors will claim 1003.1 compliance, but in fact
1N/Aare not so: they will not pass the PCTS (POSIX Compliance Test Suites).
1N/AFor example, one vendor may not define EDEADLK, or the semantics of the
1N/Aerrno values set by open(2) might not be quite right. Perl does not
1N/Aattempt to verify POSIX compliance. That means you can currently
1N/Asuccessfully say "use POSIX", and then later in your program you find
1N/Athat your vendor has been lax and there's no usable ICANON macro after
1N/Aall. This could be construed to be a bug.
1N/A
1N/A=head1 FUNCTIONS
1N/A
1N/A=over 8
1N/A
1N/A=item _exit
1N/A
1N/AThis is identical to the C function C<_exit()>. It exits the program
1N/Aimmediately which means among other things buffered I/O is B<not> flushed.
1N/A
1N/ANote that when using threads and in Linux this is B<not> a good way to
1N/Aexit a thread because in Linux processes and threads are kind of the
1N/Asame thing (Note: while this is the situation in early 2003 there are
1N/Aprojects under way to have threads with more POSIXly semantics in Linux).
1N/AIf you want not to return from a thread, detach the thread.
1N/A
1N/A=item abort
1N/A
1N/AThis is identical to the C function C<abort()>. It terminates the
1N/Aprocess with a C<SIGABRT> signal unless caught by a signal handler or
1N/Aif the handler does not return normally (it e.g. does a C<longjmp>).
1N/A
1N/A=item abs
1N/A
1N/AThis is identical to Perl's builtin C<abs()> function, returning
1N/Athe absolute value of its numerical argument.
1N/A
1N/A=item access
1N/A
1N/ADetermines the accessibility of a file.
1N/A
1N/A if( POSIX::access( "/", &POSIX::R_OK ) ){
1N/A print "have read permission\n";
1N/A }
1N/A
1N/AReturns C<undef> on failure. Note: do not use C<access()> for
1N/Asecurity purposes. Between the C<access()> call and the operation
1N/Ayou are preparing for the permissions might change: a classic
1N/AI<race condition>.
1N/A
1N/A=item acos
1N/A
1N/AThis is identical to the C function C<acos()>, returning
1N/Athe arcus cosine of its numerical argument. See also L<Math::Trig>.
1N/A
1N/A=item alarm
1N/A
1N/AThis is identical to Perl's builtin C<alarm()> function,
1N/Aeither for arming or disarming the C<SIGARLM> timer.
1N/A
1N/A=item asctime
1N/A
1N/AThis is identical to the C function C<asctime()>. It returns
1N/Aa string of the form
1N/A
1N/A "Fri Jun 2 18:22:13 2000\n\0"
1N/A
1N/Aand it is called thusly
1N/A
1N/A $asctime = asctime($sec, $min, $hour, $mday, $mon, $year,
1N/A $wday, $yday, $isdst);
1N/A
1N/AThe C<$mon> is zero-based: January equals C<0>. The C<$year> is
1N/A1900-based: 2001 equals C<101>. The C<$wday>, C<$yday>, and C<$isdst>
1N/Adefault to zero (and the first two are usually ignored anyway).
1N/A
1N/A=item asin
1N/A
1N/AThis is identical to the C function C<asin()>, returning
1N/Athe arcus sine of its numerical argument. See also L<Math::Trig>.
1N/A
1N/A=item assert
1N/A
1N/AUnimplemented, but you can use L<perlfunc/die> and the L<Carp> module
1N/Ato achieve similar things.
1N/A
1N/A=item atan
1N/A
1N/AThis is identical to the C function C<atan()>, returning the
1N/Aarcus tangent of its numerical argument. See also L<Math::Trig>.
1N/A
1N/A=item atan2
1N/A
1N/AThis is identical to Perl's builtin C<atan2()> function, returning
1N/Athe arcus tangent defined by its two numerical arguments, the I<y>
1N/Acoordinate and the I<x> coordinate. See also L<Math::Trig>.
1N/A
1N/A=item atexit
1N/A
1N/Aatexit() is C-specific: use C<END {}> instead, see L<perlsub>.
1N/A
1N/A=item atof
1N/A
1N/Aatof() is C-specific. Perl converts strings to numbers transparently.
1N/AIf you need to force a scalar to a number, add a zero to it.
1N/A
1N/A=item atoi
1N/A
1N/Aatoi() is C-specific. Perl converts strings to numbers transparently.
1N/AIf you need to force a scalar to a number, add a zero to it.
1N/AIf you need to have just the integer part, see L<perlfunc/int>.
1N/A
1N/A=item atol
1N/A
1N/Aatol() is C-specific. Perl converts strings to numbers transparently.
1N/AIf you need to force a scalar to a number, add a zero to it.
1N/AIf you need to have just the integer part, see L<perlfunc/int>.
1N/A
1N/A=item bsearch
1N/A
1N/Absearch() not supplied. For doing binary search on wordlists,
1N/Asee L<Search::Dict>.
1N/A
1N/A=item calloc
1N/A
1N/Acalloc() is C-specific. Perl does memory management transparently.
1N/A
1N/A=item ceil
1N/A
1N/AThis is identical to the C function C<ceil()>, returning the smallest
1N/Ainteger value greater than or equal to the given numerical argument.
1N/A
1N/A=item chdir
1N/A
1N/AThis is identical to Perl's builtin C<chdir()> function, allowing
1N/Aone to change the working (default) directory, see L<perlfunc/chdir>.
1N/A
1N/A=item chmod
1N/A
1N/AThis is identical to Perl's builtin C<chmod()> function, allowing
1N/Aone to change file and directory permissions, see L<perlfunc/chmod>.
1N/A
1N/A=item chown
1N/A
1N/AThis is identical to Perl's builtin C<chown()> function, allowing one
1N/Ato change file and directory owners and groups, see L<perlfunc/chown>.
1N/A
1N/A=item clearerr
1N/A
1N/AUse the method C<IO::Handle::clearerr()> instead, to reset the error
1N/Astate (if any) and EOF state (if any) of the given stream.
1N/A
1N/A=item clock
1N/A
1N/AThis is identical to the C function C<clock()>, returning the
1N/Aamount of spent processor time in microseconds.
1N/A
1N/A=item close
1N/A
1N/AClose the file. This uses file descriptors such as those obtained by calling
1N/AC<POSIX::open>.
1N/A
1N/A $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
1N/A POSIX::close( $fd );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/ASee also L<perlfunc/close>.
1N/A
1N/A=item closedir
1N/A
1N/AThis is identical to Perl's builtin C<closedir()> function for closing
1N/Aa directory handle, see L<perlfunc/closedir>.
1N/A
1N/A=item cos
1N/A
1N/AThis is identical to Perl's builtin C<cos()> function, for returning
1N/Athe cosine of its numerical argument, see L<perlfunc/cos>.
1N/ASee also L<Math::Trig>.
1N/A
1N/A=item cosh
1N/A
1N/AThis is identical to the C function C<cosh()>, for returning
1N/Athe hyperbolic cosine of its numeric argument. See also L<Math::Trig>.
1N/A
1N/A=item creat
1N/A
1N/ACreate a new file. This returns a file descriptor like the ones returned by
1N/AC<POSIX::open>. Use C<POSIX::close> to close the file.
1N/A
1N/A $fd = POSIX::creat( "foo", 0611 );
1N/A POSIX::close( $fd );
1N/A
1N/ASee also L<perlfunc/sysopen> and its C<O_CREAT> flag.
1N/A
1N/A=item ctermid
1N/A
1N/AGenerates the path name for the controlling terminal.
1N/A
1N/A $path = POSIX::ctermid();
1N/A
1N/A=item ctime
1N/A
1N/AThis is identical to the C function C<ctime()> and equivalent
1N/Ato C<asctime(localtime(...))>, see L</asctime> and L</localtime>.
1N/A
1N/A=item cuserid
1N/A
1N/AGet the login name of the owner of the current process.
1N/A
1N/A $name = POSIX::cuserid();
1N/A
1N/A=item difftime
1N/A
1N/AThis is identical to the C function C<difftime()>, for returning
1N/Athe time difference (in seconds) between two times (as returned
1N/Aby C<time()>), see L</time>.
1N/A
1N/A=item div
1N/A
1N/Adiv() is C-specific, use L<perlfunc/int> on the usual C</> division and
1N/Athe modulus C<%>.
1N/A
1N/A=item dup
1N/A
1N/AThis is similar to the C function C<dup()>, for duplicating a file
1N/Adescriptor.
1N/A
1N/AThis uses file descriptors such as those obtained by calling
1N/AC<POSIX::open>.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item dup2
1N/A
1N/AThis is similar to the C function C<dup2()>, for duplicating a file
1N/Adescriptor to an another known file descriptor.
1N/A
1N/AThis uses file descriptors such as those obtained by calling
1N/AC<POSIX::open>.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item errno
1N/A
1N/AReturns the value of errno.
1N/A
1N/A $errno = POSIX::errno();
1N/A
1N/AThis identical to the numerical values of the C<$!>, see L<perlvar/$ERRNO>.
1N/A
1N/A=item execl
1N/A
1N/Aexecl() is C-specific, see L<perlfunc/exec>.
1N/A
1N/A=item execle
1N/A
1N/Aexecle() is C-specific, see L<perlfunc/exec>.
1N/A
1N/A=item execlp
1N/A
1N/Aexeclp() is C-specific, see L<perlfunc/exec>.
1N/A
1N/A=item execv
1N/A
1N/Aexecv() is C-specific, see L<perlfunc/exec>.
1N/A
1N/A=item execve
1N/A
1N/Aexecve() is C-specific, see L<perlfunc/exec>.
1N/A
1N/A=item execvp
1N/A
1N/Aexecvp() is C-specific, see L<perlfunc/exec>.
1N/A
1N/A=item exit
1N/A
1N/AThis is identical to Perl's builtin C<exit()> function for exiting the
1N/Aprogram, see L<perlfunc/exit>.
1N/A
1N/A=item exp
1N/A
1N/AThis is identical to Perl's builtin C<exp()> function for
1N/Areturning the exponent (I<e>-based) of the numerical argument,
1N/Asee L<perlfunc/exp>.
1N/A
1N/A=item fabs
1N/A
1N/AThis is identical to Perl's builtin C<abs()> function for returning
1N/Athe absolute value of the numerical argument, see L<perlfunc/abs>.
1N/A
1N/A=item fclose
1N/A
1N/AUse method C<IO::Handle::close()> instead, or see L<perlfunc/close>.
1N/A
1N/A=item fcntl
1N/A
1N/AThis is identical to Perl's builtin C<fcntl()> function,
1N/Asee L<perlfunc/fcntl>.
1N/A
1N/A=item fdopen
1N/A
1N/AUse method C<IO::Handle::new_from_fd()> instead, or see L<perlfunc/open>.
1N/A
1N/A=item feof
1N/A
1N/AUse method C<IO::Handle::eof()> instead, or see L<perlfunc/eof>.
1N/A
1N/A=item ferror
1N/A
1N/AUse method C<IO::Handle::error()> instead.
1N/A
1N/A=item fflush
1N/A
1N/AUse method C<IO::Handle::flush()> instead.
1N/ASee also L<perlvar/$OUTPUT_AUTOFLUSH>.
1N/A
1N/A=item fgetc
1N/A
1N/AUse method C<IO::Handle::getc()> instead, or see L<perlfunc/read>.
1N/A
1N/A=item fgetpos
1N/A
1N/AUse method C<IO::Seekable::getpos()> instead, or see L<L/seek>.
1N/A
1N/A=item fgets
1N/A
1N/AUse method C<IO::Handle::gets()> instead. Similar to E<lt>E<gt>, also known
1N/Aas L<perlfunc/readline>.
1N/A
1N/A=item fileno
1N/A
1N/AUse method C<IO::Handle::fileno()> instead, or see L<perlfunc/fileno>.
1N/A
1N/A=item floor
1N/A
1N/AThis is identical to the C function C<floor()>, returning the largest
1N/Ainteger value less than or equal to the numerical argument.
1N/A
1N/A=item fmod
1N/A
1N/AThis is identical to the C function C<fmod()>.
1N/A
1N/A $r = fmod($x, $y);
1N/A
1N/AIt returns the remainder C<$r = $x - $n*$y>, where C<$n = trunc($x/$y)>.
1N/AThe C<$r> has the same sign as C<$x> and magnitude (absolute value)
1N/Aless than the magnitude of C<$y>.
1N/A
1N/A=item fopen
1N/A
1N/AUse method C<IO::File::open()> instead, or see L<perlfunc/open>.
1N/A
1N/A=item fork
1N/A
1N/AThis is identical to Perl's builtin C<fork()> function
1N/Afor duplicating the current process, see L<perlfunc/fork>
1N/Aand L<perlfork> if you are in Windows.
1N/A
1N/A=item fpathconf
1N/A
1N/ARetrieves the value of a configurable limit on a file or directory. This
1N/Auses file descriptors such as those obtained by calling C<POSIX::open>.
1N/A
1N/AThe following will determine the maximum length of the longest allowable
1N/Apathname on the filesystem which holds C</var/foo>.
1N/A
1N/A $fd = POSIX::open( "/var/foo", &POSIX::O_RDONLY );
1N/A $path_max = POSIX::fpathconf( $fd, &POSIX::_PC_PATH_MAX );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item fprintf
1N/A
1N/Afprintf() is C-specific, see L<perlfunc/printf> instead.
1N/A
1N/A=item fputc
1N/A
1N/Afputc() is C-specific, see L<perlfunc/print> instead.
1N/A
1N/A=item fputs
1N/A
1N/Afputs() is C-specific, see L<perlfunc/print> instead.
1N/A
1N/A=item fread
1N/A
1N/Afread() is C-specific, see L<perlfunc/read> instead.
1N/A
1N/A=item free
1N/A
1N/Afree() is C-specific. Perl does memory management transparently.
1N/A
1N/A=item freopen
1N/A
1N/Afreopen() is C-specific, see L<perlfunc/open> instead.
1N/A
1N/A=item frexp
1N/A
1N/AReturn the mantissa and exponent of a floating-point number.
1N/A
1N/A ($mantissa, $exponent) = POSIX::frexp( 1.234e56 );
1N/A
1N/A=item fscanf
1N/A
1N/Afscanf() is C-specific, use E<lt>E<gt> and regular expressions instead.
1N/A
1N/A=item fseek
1N/A
1N/AUse method C<IO::Seekable::seek()> instead, or see L<perlfunc/seek>.
1N/A
1N/A=item fsetpos
1N/A
1N/AUse method C<IO::Seekable::setpos()> instead, or seek L<perlfunc/seek>.
1N/A
1N/A=item fstat
1N/A
1N/AGet file status. This uses file descriptors such as those obtained by
1N/Acalling C<POSIX::open>. The data returned is identical to the data from
1N/APerl's builtin C<stat> function.
1N/A
1N/A $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
1N/A @stats = POSIX::fstat( $fd );
1N/A
1N/A=item fsync
1N/A
1N/AUse method C<IO::Handle::sync()> instead.
1N/A
1N/A=item ftell
1N/A
1N/AUse method C<IO::Seekable::tell()> instead, or see L<perlfunc/tell>.
1N/A
1N/A=item fwrite
1N/A
1N/Afwrite() is C-specific, see L<perlfunc/print> instead.
1N/A
1N/A=item getc
1N/A
1N/AThis is identical to Perl's builtin C<getc()> function,
1N/Asee L<perlfunc/getc>.
1N/A
1N/A=item getchar
1N/A
1N/AReturns one character from STDIN. Identical to Perl's C<getc()>,
1N/Asee L<perlfunc/getc>.
1N/A
1N/A=item getcwd
1N/A
1N/AReturns the name of the current working directory.
1N/ASee also L<Cwd>.
1N/A
1N/A=item getegid
1N/A
1N/AReturns the effective group identifier. Similar to Perl' s builtin
1N/Avariable C<$(>, see L<perlvar/$EGID>.
1N/A
1N/A=item getenv
1N/A
1N/AReturns the value of the specified enironment variable.
1N/AThe same information is available through the C<%ENV> array.
1N/A
1N/A=item geteuid
1N/A
1N/AReturns the effective user identifier. Identical to Perl's builtin C<$E<gt>>
1N/Avariable, see L<perlvar/$EUID>.
1N/A
1N/A=item getgid
1N/A
1N/AReturns the user's real group identifier. Similar to Perl's builtin
1N/Avariable C<$)>, see L<perlvar/$GID>.
1N/A
1N/A=item getgrgid
1N/A
1N/AThis is identical to Perl's builtin C<getgrgid()> function for
1N/Areturning group entries by group identifiers, see
1N/AL<perlfunc/getgrgid>.
1N/A
1N/A=item getgrnam
1N/A
1N/AThis is identical to Perl's builtin C<getgrnam()> function for
1N/Areturning group entries by group names, see L<perlfunc/getgrnam>.
1N/A
1N/A=item getgroups
1N/A
1N/AReturns the ids of the user's supplementary groups. Similar to Perl's
1N/Abuiltin variable C<$)>, see L<perlvar/$GID>.
1N/A
1N/A=item getlogin
1N/A
1N/AThis is identical to Perl's builtin C<getlogin()> function for
1N/Areturning the user name associated with the current session, see
1N/AL<perlfunc/getlogin>.
1N/A
1N/A=item getpgrp
1N/A
1N/AThis is identical to Perl's builtin C<getpgrp()> function for
1N/Areturning the prcess group identifier of the current process, see
1N/AL<perlfunc/getpgrp>.
1N/A
1N/A=item getpid
1N/A
1N/AReturns the process identifier. Identical to Perl's builtin
1N/Avariable C<$$>, see L<perlvar/$PID>.
1N/A
1N/A=item getppid
1N/A
1N/AThis is identical to Perl's builtin C<getppid()> function for
1N/Areturning the process identifier of the parent process of the current
1N/Aprocess , see L<perlfunc/getppid>.
1N/A
1N/A=item getpwnam
1N/A
1N/AThis is identical to Perl's builtin C<getpwnam()> function for
1N/Areturning user entries by user names, see L<perlfunc/getpwnam>.
1N/A
1N/A=item getpwuid
1N/A
1N/AThis is identical to Perl's builtin C<getpwuid()> function for
1N/Areturning user entries by user identifiers, see L<perlfunc/getpwuid>.
1N/A
1N/A=item gets
1N/A
1N/AReturns one line from C<STDIN>, similar to E<lt>E<gt>, also known
1N/Aas the C<readline()> function, see L<perlfunc/readline>.
1N/A
1N/AB<NOTE>: if you have C programs that still use C<gets()>, be very
1N/Aafraid. The C<gets()> function is a source of endless grief because
1N/Ait has no buffer overrun checks. It should B<never> be used. The
1N/AC<fgets()> function should be preferred instead.
1N/A
1N/A=item getuid
1N/A
1N/AReturns the user's identifier. Identical to Perl's builtin C<$E<lt>> variable,
1N/Asee L<perlvar/$UID>.
1N/A
1N/A=item gmtime
1N/A
1N/AThis is identical to Perl's builtin C<gmtime()> function for
1N/Aconverting seconds since the epoch to a date in Greenwich Mean Time,
1N/Asee L<perlfunc/gmtime>.
1N/A
1N/A=item isalnum
1N/A
1N/AThis is identical to the C function, except that it can apply to a
1N/Asingle character or to a whole string. Note that locale settings may
1N/Aaffect what characters are considered C<isalnum>. Does not work on
1N/AUnicode characters code point 256 or higher. Consider using regular
1N/Aexpressions and the C</[[:alnum:]]/> construct instead, or possibly
1N/Athe C</\w/> construct.
1N/A
1N/A=item isalpha
1N/A
1N/AThis is identical to the C function, except that it can apply to
1N/Aa single character or to a whole string. Note that locale settings
1N/Amay affect what characters are considered C<isalpha>. Does not work
1N/Aon Unicode characters code point 256 or higher. Consider using regular
1N/Aexpressions and the C</[[:alpha:]]/> construct instead.
1N/A
1N/A=item isatty
1N/A
1N/AReturns a boolean indicating whether the specified filehandle is connected
1N/Ato a tty. Similar to the C<-t> operator, see L<perlfunc/-X>.
1N/A
1N/A=item iscntrl
1N/A
1N/AThis is identical to the C function, except that it can apply to
1N/Aa single character or to a whole string. Note that locale settings
1N/Amay affect what characters are considered C<iscntrl>. Does not work
1N/Aon Unicode characters code point 256 or higher. Consider using regular
1N/Aexpressions and the C</[[:cntrl:]]/> construct instead.
1N/A
1N/A=item isdigit
1N/A
1N/AThis is identical to the C function, except that it can apply to
1N/Aa single character or to a whole string. Note that locale settings
1N/Amay affect what characters are considered C<isdigit> (unlikely, but
1N/Astill possible). Does not work on Unicode characters code point 256
1N/Aor higher. Consider using regular expressions and the C</[[:digit:]]/>
1N/Aconstruct instead, or the C</\d/> construct.
1N/A
1N/A=item isgraph
1N/A
1N/AThis is identical to the C function, except that it can apply to
1N/Aa single character or to a whole string. Note that locale settings
1N/Amay affect what characters are considered C<isgraph>. Does not work
1N/Aon Unicode characters code point 256 or higher. Consider using regular
1N/Aexpressions and the C</[[:graph:]]/> construct instead.
1N/A
1N/A=item islower
1N/A
1N/AThis is identical to the C function, except that it can apply to
1N/Aa single character or to a whole string. Note that locale settings
1N/Amay affect what characters are considered C<islower>. Does not work
1N/Aon Unicode characters code point 256 or higher. Consider using regular
1N/Aexpressions and the C</[[:lower:]]/> construct instead. Do B<not> use
1N/AC</[a-z]/>.
1N/A
1N/A=item isprint
1N/A
1N/AThis is identical to the C function, except that it can apply to
1N/Aa single character or to a whole string. Note that locale settings
1N/Amay affect what characters are considered C<isprint>. Does not work
1N/Aon Unicode characters code point 256 or higher. Consider using regular
1N/Aexpressions and the C</[[:print:]]/> construct instead.
1N/A
1N/A=item ispunct
1N/A
1N/AThis is identical to the C function, except that it can apply to
1N/Aa single character or to a whole string. Note that locale settings
1N/Amay affect what characters are considered C<ispunct>. Does not work
1N/Aon Unicode characters code point 256 or higher. Consider using regular
1N/Aexpressions and the C</[[:punct:]]/> construct instead.
1N/A
1N/A=item isspace
1N/A
1N/AThis is identical to the C function, except that it can apply to
1N/Aa single character or to a whole string. Note that locale settings
1N/Amay affect what characters are considered C<isspace>. Does not work
1N/Aon Unicode characters code point 256 or higher. Consider using regular
1N/Aexpressions and the C</[[:space:]]/> construct instead, or the C</\s/>
1N/Aconstruct. (Note that C</\s/> and C</[[:space:]]/> are slightly
1N/Adifferent in that C</[[:space:]]/> can normally match a vertical tab,
1N/Awhile C</\s/> does not.)
1N/A
1N/A=item isupper
1N/A
1N/AThis is identical to the C function, except that it can apply to
1N/Aa single character or to a whole string. Note that locale settings
1N/Amay affect what characters are considered C<isupper>. Does not work
1N/Aon Unicode characters code point 256 or higher. Consider using regular
1N/Aexpressions and the C</[[:upper:]]/> construct instead. Do B<not> use
1N/AC</[A-Z]/>.
1N/A
1N/A=item isxdigit
1N/A
1N/AThis is identical to the C function, except that it can apply to a single
1N/Acharacter or to a whole string. Note that locale settings may affect what
1N/Acharacters are considered C<isxdigit> (unlikely, but still possible).
1N/ADoes not work on Unicode characters code point 256 or higher.
1N/AConsider using regular expressions and the C</[[:xdigit:]]/>
1N/Aconstruct instead, or simply C</[0-9a-f]/i>.
1N/A
1N/A=item kill
1N/A
1N/AThis is identical to Perl's builtin C<kill()> function for sending
1N/Asignals to processes (often to terminate them), see L<perlfunc/kill>.
1N/A
1N/A=item labs
1N/A
1N/A(For returning absolute values of long integers.)
1N/Alabs() is C-specific, see L<perlfunc/abs> instead.
1N/A
1N/A=item ldexp
1N/A
1N/AThis is identical to the C function C<ldexp()>
1N/Afor multiplying floating point numbers with powers of two.
1N/A
1N/A $x_quadrupled = POSIX::ldexp($x, 2);
1N/A
1N/A=item ldiv
1N/A
1N/A(For computing dividends of long integers.)
1N/Aldiv() is C-specific, use C</> and C<int()> instead.
1N/A
1N/A=item link
1N/A
1N/AThis is identical to Perl's builtin C<link()> function
1N/Afor creating hard links into files, see L<perlfunc/link>.
1N/A
1N/A=item localeconv
1N/A
1N/AGet numeric formatting information. Returns a reference to a hash
1N/Acontaining the current locale formatting values.
1N/A
1N/AHere is how to query the database for the B<de> (Deutsch or German) locale.
1N/A
1N/A $loc = POSIX::setlocale( &POSIX::LC_ALL, "de" );
1N/A print "Locale = $loc\n";
1N/A $lconv = POSIX::localeconv();
1N/A print "decimal_point = ", $lconv->{decimal_point}, "\n";
1N/A print "thousands_sep = ", $lconv->{thousands_sep}, "\n";
1N/A print "grouping = ", $lconv->{grouping}, "\n";
1N/A print "int_curr_symbol = ", $lconv->{int_curr_symbol}, "\n";
1N/A print "currency_symbol = ", $lconv->{currency_symbol}, "\n";
1N/A print "mon_decimal_point = ", $lconv->{mon_decimal_point}, "\n";
1N/A print "mon_thousands_sep = ", $lconv->{mon_thousands_sep}, "\n";
1N/A print "mon_grouping = ", $lconv->{mon_grouping}, "\n";
1N/A print "positive_sign = ", $lconv->{positive_sign}, "\n";
1N/A print "negative_sign = ", $lconv->{negative_sign}, "\n";
1N/A print "int_frac_digits = ", $lconv->{int_frac_digits}, "\n";
1N/A print "frac_digits = ", $lconv->{frac_digits}, "\n";
1N/A print "p_cs_precedes = ", $lconv->{p_cs_precedes}, "\n";
1N/A print "p_sep_by_space = ", $lconv->{p_sep_by_space}, "\n";
1N/A print "n_cs_precedes = ", $lconv->{n_cs_precedes}, "\n";
1N/A print "n_sep_by_space = ", $lconv->{n_sep_by_space}, "\n";
1N/A print "p_sign_posn = ", $lconv->{p_sign_posn}, "\n";
1N/A print "n_sign_posn = ", $lconv->{n_sign_posn}, "\n";
1N/A
1N/A=item localtime
1N/A
1N/AThis is identical to Perl's builtin C<localtime()> function for
1N/Aconverting seconds since the epoch to a date see L<perlfunc/localtime>.
1N/A
1N/A=item log
1N/A
1N/AThis is identical to Perl's builtin C<log()> function,
1N/Areturning the natural (I<e>-based) logarithm of the numerical argument,
1N/Asee L<perlfunc/log>.
1N/A
1N/A=item log10
1N/A
1N/AThis is identical to the C function C<log10()>,
1N/Areturning the 10-base logarithm of the numerical argument.
1N/AYou can also use
1N/A
1N/A sub log10 { log($_[0]) / log(10) }
1N/A
1N/Aor
1N/A
1N/A sub log10 { log($_[0]) / 2.30258509299405 }
1N/A
1N/Aor
1N/A
1N/A sub log10 { log($_[0]) * 0.434294481903252 }
1N/A
1N/A=item longjmp
1N/A
1N/Alongjmp() is C-specific: use L<perlfunc/die> instead.
1N/A
1N/A=item lseek
1N/A
1N/AMove the file's read/write position. This uses file descriptors such as
1N/Athose obtained by calling C<POSIX::open>.
1N/A
1N/A $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
1N/A $off_t = POSIX::lseek( $fd, 0, &POSIX::SEEK_SET );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item malloc
1N/A
1N/Amalloc() is C-specific. Perl does memory management transparently.
1N/A
1N/A=item mblen
1N/A
1N/AThis is identical to the C function C<mblen()>.
1N/APerl does not have any support for the wide and multibyte
1N/Acharacters of the C standards, so this might be a rather
1N/Auseless function.
1N/A
1N/A=item mbstowcs
1N/A
1N/AThis is identical to the C function C<mbstowcs()>.
1N/APerl does not have any support for the wide and multibyte
1N/Acharacters of the C standards, so this might be a rather
1N/Auseless function.
1N/A
1N/A=item mbtowc
1N/A
1N/AThis is identical to the C function C<mbtowc()>.
1N/APerl does not have any support for the wide and multibyte
1N/Acharacters of the C standards, so this might be a rather
1N/Auseless function.
1N/A
1N/A=item memchr
1N/A
1N/Amemchr() is C-specific, see L<perlfunc/index> instead.
1N/A
1N/A=item memcmp
1N/A
1N/Amemcmp() is C-specific, use C<eq> instead, see L<perlop>.
1N/A
1N/A=item memcpy
1N/A
1N/Amemcpy() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
1N/A
1N/A=item memmove
1N/A
1N/Amemmove() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
1N/A
1N/A=item memset
1N/A
1N/Amemset() is C-specific, use C<x> instead, see L<perlop>.
1N/A
1N/A=item mkdir
1N/A
1N/AThis is identical to Perl's builtin C<mkdir()> function
1N/Afor creating directories, see L<perlfunc/mkdir>.
1N/A
1N/A=item mkfifo
1N/A
1N/AThis is similar to the C function C<mkfifo()> for creating
1N/AFIFO special files.
1N/A
1N/A if (mkfifo($path, $mode)) { ....
1N/A
1N/AReturns C<undef> on failure. The C<$mode> is similar to the
1N/Amode of C<mkdir()>, see L<perlfunc/mkdir>.
1N/A
1N/A=item mktime
1N/A
1N/AConvert date/time info to a calendar time.
1N/A
1N/ASynopsis:
1N/A
1N/A mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0)
1N/A
1N/AThe month (C<mon>), weekday (C<wday>), and yearday (C<yday>) begin at zero.
1N/AI.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The
1N/Ayear (C<year>) is given in years since 1900. I.e. The year 1995 is 95; the
1N/Ayear 2001 is 101. Consult your system's C<mktime()> manpage for details
1N/Aabout these and the other arguments.
1N/A
1N/ACalendar time for December 12, 1995, at 10:30 am.
1N/A
1N/A $time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 );
1N/A print "Date = ", POSIX::ctime($time_t);
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item modf
1N/A
1N/AReturn the integral and fractional parts of a floating-point number.
1N/A
1N/A ($fractional, $integral) = POSIX::modf( 3.14 );
1N/A
1N/A=item nice
1N/A
1N/AThis is similar to the C function C<nice()>, for changing
1N/Athe scheduling preference of the current process. Positive
1N/Aarguments mean more polite process, negative values more
1N/Aneedy process. Normal user processes can only be more polite.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item offsetof
1N/A
1N/Aoffsetof() is C-specific, you probably want to see L<perlfunc/pack> instead.
1N/A
1N/A=item open
1N/A
1N/AOpen a file for reading for writing. This returns file descriptors, not
1N/APerl filehandles. Use C<POSIX::close> to close the file.
1N/A
1N/AOpen a file read-only with mode 0666.
1N/A
1N/A $fd = POSIX::open( "foo" );
1N/A
1N/AOpen a file for read and write.
1N/A
1N/A $fd = POSIX::open( "foo", &POSIX::O_RDWR );
1N/A
1N/AOpen a file for write, with truncation.
1N/A
1N/A $fd = POSIX::open( "foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC );
1N/A
1N/ACreate a new file with mode 0640. Set up the file for writing.
1N/A
1N/A $fd = POSIX::open( "foo", &POSIX::O_CREAT | &POSIX::O_WRONLY, 0640 );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/ASee also L<perlfunc/sysopen>.
1N/A
1N/A=item opendir
1N/A
1N/AOpen a directory for reading.
1N/A
1N/A $dir = POSIX::opendir( "/var" );
1N/A @files = POSIX::readdir( $dir );
1N/A POSIX::closedir( $dir );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item pathconf
1N/A
1N/ARetrieves the value of a configurable limit on a file or directory.
1N/A
1N/AThe following will determine the maximum length of the longest allowable
1N/Apathname on the filesystem which holds C</var>.
1N/A
1N/A $path_max = POSIX::pathconf( "/var", &POSIX::_PC_PATH_MAX );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item pause
1N/A
1N/AThis is similar to the C function C<pause()>, which suspends
1N/Athe execution of the current process until a signal is received.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item perror
1N/A
1N/AThis is identical to the C function C<perror()>, which outputs to the
1N/Astandard error stream the specified message followed by ": " and the
1N/Acurrent error string. Use the C<warn()> function and the C<$!>
1N/Avariable instead, see L<perlfunc/warn> and L<perlvar/$ERRNO>.
1N/A
1N/A=item pipe
1N/A
1N/ACreate an interprocess channel. This returns file descriptors like those
1N/Areturned by C<POSIX::open>.
1N/A
1N/A ($fd0, $fd1) = POSIX::pipe();
1N/A POSIX::write( $fd0, "hello", 5 );
1N/A POSIX::read( $fd1, $buf, 5 );
1N/A
1N/ASee also L<perlfunc/pipe>.
1N/A
1N/A=item pow
1N/A
1N/AComputes C<$x> raised to the power C<$exponent>.
1N/A
1N/A $ret = POSIX::pow( $x, $exponent );
1N/A
1N/AYou can also use the C<**> operator, see L<perlop>.
1N/A
1N/A=item printf
1N/A
1N/AFormats and prints the specified arguments to STDOUT.
1N/ASee also L<perlfunc/printf>.
1N/A
1N/A=item putc
1N/A
1N/Aputc() is C-specific, see L<perlfunc/print> instead.
1N/A
1N/A=item putchar
1N/A
1N/Aputchar() is C-specific, see L<perlfunc/print> instead.
1N/A
1N/A=item puts
1N/A
1N/Aputs() is C-specific, see L<perlfunc/print> instead.
1N/A
1N/A=item qsort
1N/A
1N/Aqsort() is C-specific, see L<perlfunc/sort> instead.
1N/A
1N/A=item raise
1N/A
1N/ASends the specified signal to the current process.
1N/ASee also L<perlfunc/kill> and the C<$$> in L<perlvar/$PID>.
1N/A
1N/A=item rand
1N/A
1N/AC<rand()> is non-portable, see L<perlfunc/rand> instead.
1N/A
1N/A=item read
1N/A
1N/ARead from a file. This uses file descriptors such as those obtained by
1N/Acalling C<POSIX::open>. If the buffer C<$buf> is not large enough for the
1N/Aread then Perl will extend it to make room for the request.
1N/A
1N/A $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
1N/A $bytes = POSIX::read( $fd, $buf, 3 );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/ASee also L<perlfunc/sysread>.
1N/A
1N/A=item readdir
1N/A
1N/AThis is identical to Perl's builtin C<readdir()> function
1N/Afor reading directory entries, see L<perlfunc/readdir>.
1N/A
1N/A=item realloc
1N/A
1N/Arealloc() is C-specific. Perl does memory management transparently.
1N/A
1N/A=item remove
1N/A
1N/AThis is identical to Perl's builtin C<unlink()> function
1N/Afor removing files, see L<perlfunc/unlink>.
1N/A
1N/A=item rename
1N/A
1N/AThis is identical to Perl's builtin C<rename()> function
1N/Afor renaming files, see L<perlfunc/rename>.
1N/A
1N/A=item rewind
1N/A
1N/ASeeks to the beginning of the file.
1N/A
1N/A=item rewinddir
1N/A
1N/AThis is identical to Perl's builtin C<rewinddir()> function for
1N/Arewinding directory entry streams, see L<perlfunc/rewinddir>.
1N/A
1N/A=item rmdir
1N/A
1N/AThis is identical to Perl's builtin C<rmdir()> function
1N/Afor removing (empty) directories, see L<perlfunc/rmdir>.
1N/A
1N/A=item scanf
1N/A
1N/Ascanf() is C-specific, use E<lt>E<gt> and regular expressions instead,
1N/Asee L<perlre>.
1N/A
1N/A=item setgid
1N/A
1N/ASets the real group identifier and the effective group identifier for
1N/Athis process. Similar to assigning a value to the Perl's builtin
1N/AC<$)> variable, see L<perlvar/$GID>, except that the latter
1N/Awill change only the real user identifier, and that the setgid()
1N/Auses only a single numeric argument, as opposed to a space-separated
1N/Alist of numbers.
1N/A
1N/A=item setjmp
1N/A
1N/AC<setjmp()> is C-specific: use C<eval {}> instead,
1N/Asee L<perlfunc/eval>.
1N/A
1N/A=item setlocale
1N/A
1N/AModifies and queries program's locale. The following examples assume
1N/A
1N/A use POSIX qw(setlocale LC_ALL LC_CTYPE);
1N/A
1N/Ahas been issued.
1N/A
1N/AThe following will set the traditional UNIX system locale behavior
1N/A(the second argument C<"C">).
1N/A
1N/A $loc = setlocale( LC_ALL, "C" );
1N/A
1N/AThe following will query the current LC_CTYPE category. (No second
1N/Aargument means 'query'.)
1N/A
1N/A $loc = setlocale( LC_CTYPE );
1N/A
1N/AThe following will set the LC_CTYPE behaviour according to the locale
1N/Aenvironment variables (the second argument C<"">).
1N/APlease see your systems C<setlocale(3)> documentation for the locale
1N/Aenvironment variables' meaning or consult L<perllocale>.
1N/A
1N/A $loc = setlocale( LC_CTYPE, "" );
1N/A
1N/AThe following will set the LC_COLLATE behaviour to Argentinian
1N/ASpanish. B<NOTE>: The naming and availability of locales depends on
1N/Ayour operating system. Please consult L<perllocale> for how to find
1N/Aout which locales are available in your system.
1N/A
1N/A $loc = setlocale( LC_ALL, "es_AR.ISO8859-1" );
1N/A
1N/A=item setpgid
1N/A
1N/AThis is similar to the C function C<setpgid()> for
1N/Asetting the process group identifier of the current process.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item setsid
1N/A
1N/AThis is identical to the C function C<setsid()> for
1N/Asetting the session identifier of the current process.
1N/A
1N/A=item setuid
1N/A
1N/ASets the real user identifier and the effective user identifier for
1N/Athis process. Similar to assigning a value to the Perl's builtin
1N/AC<$E<lt>> variable, see L<perlvar/$UID>, except that the latter
1N/Awill change only the real user identifier.
1N/A
1N/A=item sigaction
1N/A
1N/ADetailed signal management. This uses C<POSIX::SigAction> objects for the
1N/AC<action> and C<oldaction> arguments. Consult your system's C<sigaction>
1N/Amanpage for details.
1N/A
1N/ASynopsis:
1N/A
1N/A sigaction(signal, action, oldaction = 0)
1N/A
1N/AReturns C<undef> on failure. The C<signal> must be a number (like
1N/ASIGHUP), not a string (like "SIGHUP"), though Perl does try hard
1N/Ato understand you.
1N/A
1N/A=item siglongjmp
1N/A
1N/Asiglongjmp() is C-specific: use L<perlfunc/die> instead.
1N/A
1N/A=item sigpending
1N/A
1N/AExamine signals that are blocked and pending. This uses C<POSIX::SigSet>
1N/Aobjects for the C<sigset> argument. Consult your system's C<sigpending>
1N/Amanpage for details.
1N/A
1N/ASynopsis:
1N/A
1N/A sigpending(sigset)
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item sigprocmask
1N/A
1N/AChange and/or examine calling process's signal mask. This uses
1N/AC<POSIX::SigSet> objects for the C<sigset> and C<oldsigset> arguments.
1N/AConsult your system's C<sigprocmask> manpage for details.
1N/A
1N/ASynopsis:
1N/A
1N/A sigprocmask(how, sigset, oldsigset = 0)
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item sigsetjmp
1N/A
1N/AC<sigsetjmp()> is C-specific: use C<eval {}> instead,
1N/Asee L<perlfunc/eval>.
1N/A
1N/A=item sigsuspend
1N/A
1N/AInstall a signal mask and suspend process until signal arrives. This uses
1N/AC<POSIX::SigSet> objects for the C<signal_mask> argument. Consult your
1N/Asystem's C<sigsuspend> manpage for details.
1N/A
1N/ASynopsis:
1N/A
1N/A sigsuspend(signal_mask)
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item sin
1N/A
1N/AThis is identical to Perl's builtin C<sin()> function
1N/Afor returning the sine of the numerical argument,
1N/Asee L<perlfunc/sin>. See also L<Math::Trig>.
1N/A
1N/A=item sinh
1N/A
1N/AThis is identical to the C function C<sinh()>
1N/Afor returning the hyperbolic sine of the numerical argument.
1N/ASee also L<Math::Trig>.
1N/A
1N/A=item sleep
1N/A
1N/AThis is functionally identical to Perl's builtin C<sleep()> function
1N/Afor suspending the execution of the current for process for certain
1N/Anumber of seconds, see L<perlfunc/sleep>. There is one signifanct
1N/Adifference, however: C<POSIX::sleep()> returns the number of
1N/AB<unslept> seconds, while the C<CORE::sleep()> returns the
1N/Anumber of slept seconds.
1N/A
1N/A=item sprintf
1N/A
1N/AThis is similar to Perl's builtin C<sprintf()> function
1N/Afor returning a string that has the arguments formatted as requested,
1N/Asee L<perlfunc/sprintf>.
1N/A
1N/A=item sqrt
1N/A
1N/AThis is identical to Perl's builtin C<sqrt()> function.
1N/Afor returning the square root of the numerical argument,
1N/Asee L<perlfunc/sqrt>.
1N/A
1N/A=item srand
1N/A
1N/AGive a seed the pseudorandom number generator, see L<perlfunc/srand>.
1N/A
1N/A=item sscanf
1N/A
1N/Asscanf() is C-specific, use regular expressions instead,
1N/Asee L<perlre>.
1N/A
1N/A=item stat
1N/A
1N/AThis is identical to Perl's builtin C<stat()> function
1N/Afor retutning information about files and directories.
1N/A
1N/A=item strcat
1N/A
1N/Astrcat() is C-specific, use C<.=> instead, see L<perlop>.
1N/A
1N/A=item strchr
1N/A
1N/Astrchr() is C-specific, see L<perlfunc/index> instead.
1N/A
1N/A=item strcmp
1N/A
1N/Astrcmp() is C-specific, use C<eq> or C<cmp> instead, see L<perlop>.
1N/A
1N/A=item strcoll
1N/A
1N/AThis is identical to the C function C<strcoll()>
1N/Afor collating (comparing) strings transformed using
1N/Athe C<strxfrm()> function. Not really needed since
1N/APerl can do this transparently, see L<perllocale>.
1N/A
1N/A=item strcpy
1N/A
1N/Astrcpy() is C-specific, use C<=> instead, see L<perlop>.
1N/A
1N/A=item strcspn
1N/A
1N/Astrcspn() is C-specific, use regular expressions instead,
1N/Asee L<perlre>.
1N/A
1N/A=item strerror
1N/A
1N/AReturns the error string for the specified errno.
1N/AIdentical to the string form of the C<$!>, see L<perlvar/$ERRNO>.
1N/A
1N/A=item strftime
1N/A
1N/AConvert date and time information to string. Returns the string.
1N/A
1N/ASynopsis:
1N/A
1N/A strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
1N/A
1N/AThe month (C<mon>), weekday (C<wday>), and yearday (C<yday>) begin at zero.
1N/AI.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The
1N/Ayear (C<year>) is given in years since 1900. I.e., the year 1995 is 95; the
1N/Ayear 2001 is 101. Consult your system's C<strftime()> manpage for details
1N/Aabout these and the other arguments.
1N/A
1N/AIf you want your code to be portable, your format (C<fmt>) argument
1N/Ashould use only the conversion specifiers defined by the ANSI C
1N/Astandard (C89, to play safe). These are C<aAbBcdHIjmMpSUwWxXyYZ%>.
1N/ABut even then, the B<results> of some of the conversion specifiers are
1N/Anon-portable. For example, the specifiers C<aAbBcpZ> change according
1N/Ato the locale settings of the user, and both how to set locales (the
1N/Alocale names) and what output to expect are non-standard.
1N/AThe specifier C<c> changes according to the timezone settings of the
1N/Auser and the timezone computation rules of the operating system.
1N/AThe C<Z> specifier is notoriously unportable since the names of
1N/Atimezones are non-standard. Sticking to the numeric specifiers is the
1N/Asafest route.
1N/A
1N/AThe given arguments are made consistent as though by calling
1N/AC<mktime()> before calling your system's C<strftime()> function,
1N/Aexcept that the C<isdst> value is not affected.
1N/A
1N/AThe string for Tuesday, December 12, 1995.
1N/A
1N/A $str = POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 12, 11, 95, 2 );
1N/A print "$str\n";
1N/A
1N/A=item strlen
1N/A
1N/Astrlen() is C-specific, use C<length()> instead, see L<perlfunc/length>.
1N/A
1N/A=item strncat
1N/A
1N/Astrncat() is C-specific, use C<.=> instead, see L<perlop>.
1N/A
1N/A=item strncmp
1N/A
1N/Astrncmp() is C-specific, use C<eq> instead, see L<perlop>.
1N/A
1N/A=item strncpy
1N/A
1N/Astrncpy() is C-specific, use C<=> instead, see L<perlop>.
1N/A
1N/A=item strpbrk
1N/A
1N/Astrpbrk() is C-specific, use regular expressions instead,
1N/Asee L<perlre>.
1N/A
1N/A=item strrchr
1N/A
1N/Astrrchr() is C-specific, see L<perlfunc/rindex> instead.
1N/A
1N/A=item strspn
1N/A
1N/Astrspn() is C-specific, use regular expressions instead,
1N/Asee L<perlre>.
1N/A
1N/A=item strstr
1N/A
1N/AThis is identical to Perl's builtin C<index()> function,
1N/Asee L<perlfunc/index>.
1N/A
1N/A=item strtod
1N/A
1N/AString to double translation. Returns the parsed number and the number
1N/Aof characters in the unparsed portion of the string. Truly
1N/APOSIX-compliant systems set $! ($ERRNO) to indicate a translation
1N/Aerror, so clear $! before calling strtod. However, non-POSIX systems
1N/Amay not check for overflow, and therefore will never set $!.
1N/A
1N/Astrtod should respect any POSIX I<setlocale()> settings.
1N/A
1N/ATo parse a string $str as a floating point number use
1N/A
1N/A $! = 0;
1N/A ($num, $n_unparsed) = POSIX::strtod($str);
1N/A
1N/AThe second returned item and $! can be used to check for valid input:
1N/A
1N/A if (($str eq '') || ($n_unparsed != 0) || !$!) {
1N/A die "Non-numeric input $str" . $! ? ": $!\n" : "\n";
1N/A }
1N/A
1N/AWhen called in a scalar context strtod returns the parsed number.
1N/A
1N/A=item strtok
1N/A
1N/Astrtok() is C-specific, use regular expressions instead, see
1N/AL<perlre>, or L<perlfunc/split>.
1N/A
1N/A=item strtol
1N/A
1N/AString to (long) integer translation. Returns the parsed number and
1N/Athe number of characters in the unparsed portion of the string. Truly
1N/APOSIX-compliant systems set $! ($ERRNO) to indicate a translation
1N/Aerror, so clear $! before calling strtol. However, non-POSIX systems
1N/Amay not check for overflow, and therefore will never set $!.
1N/A
1N/Astrtol should respect any POSIX I<setlocale()> settings.
1N/A
1N/ATo parse a string $str as a number in some base $base use
1N/A
1N/A $! = 0;
1N/A ($num, $n_unparsed) = POSIX::strtol($str, $base);
1N/A
1N/AThe base should be zero or between 2 and 36, inclusive. When the base
1N/Ais zero or omitted strtol will use the string itself to determine the
1N/Abase: a leading "0x" or "0X" means hexadecimal; a leading "0" means
1N/Aoctal; any other leading characters mean decimal. Thus, "1234" is
1N/Aparsed as a decimal number, "01234" as an octal number, and "0x1234"
1N/Aas a hexadecimal number.
1N/A
1N/AThe second returned item and $! can be used to check for valid input:
1N/A
1N/A if (($str eq '') || ($n_unparsed != 0) || !$!) {
1N/A die "Non-numeric input $str" . $! ? ": $!\n" : "\n";
1N/A }
1N/A
1N/AWhen called in a scalar context strtol returns the parsed number.
1N/A
1N/A=item strtoul
1N/A
1N/AString to unsigned (long) integer translation. strtoul() is identical
1N/Ato strtol() except that strtoul() only parses unsigned integers. See
1N/AL</strtol> for details.
1N/A
1N/ANote: Some vendors supply strtod() and strtol() but not strtoul().
1N/AOther vendors that do supply strtoul() parse "-1" as a valid value.
1N/A
1N/A=item strxfrm
1N/A
1N/AString transformation. Returns the transformed string.
1N/A
1N/A $dst = POSIX::strxfrm( $src );
1N/A
1N/AUsed in conjunction with the C<strcoll()> function, see L</strcoll>.
1N/A
1N/ANot really needed since Perl can do this transparently, see
1N/AL<perllocale>.
1N/A
1N/A=item sysconf
1N/A
1N/ARetrieves values of system configurable variables.
1N/A
1N/AThe following will get the machine's clock speed.
1N/A
1N/A $clock_ticks = POSIX::sysconf( &POSIX::_SC_CLK_TCK );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item system
1N/A
1N/AThis is identical to Perl's builtin C<system()> function, see
1N/AL<perlfunc/system>.
1N/A
1N/A=item tan
1N/A
1N/AThis is identical to the C function C<tan()>, returning the
1N/Atangent of the numerical argument. See also L<Math::Trig>.
1N/A
1N/A=item tanh
1N/A
1N/AThis is identical to the C function C<tanh()>, returning the
1N/Ahyperbolic tangent of the numerical argument. See also L<Math::Trig>.
1N/A
1N/A=item tcdrain
1N/A
1N/AThis is similar to the C function C<tcdrain()> for draining
1N/Athe output queue of its argument stream.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item tcflow
1N/A
1N/AThis is similar to the C function C<tcflow()> for controlling
1N/Athe flow of its argument stream.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item tcflush
1N/A
1N/AThis is similar to the C function C<tcflush()> for flushing
1N/Athe I/O buffers of its argument stream.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item tcgetpgrp
1N/A
1N/AThis is identical to the C function C<tcgetpgrp()> for returning the
1N/Aprocess group identifier of the foreground process group of the controlling
1N/Aterminal.
1N/A
1N/A=item tcsendbreak
1N/A
1N/AThis is similar to the C function C<tcsendbreak()> for sending
1N/Aa break on its argument stream.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item tcsetpgrp
1N/A
1N/AThis is similar to the C function C<tcsetpgrp()> for setting the
1N/Aprocess group identifier of the foreground process group of the controlling
1N/Aterminal.
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item time
1N/A
1N/AThis is identical to Perl's builtin C<time()> function
1N/Afor returning the number of seconds since the epoch
1N/A(whatever it is for the system), see L<perlfunc/time>.
1N/A
1N/A=item times
1N/A
1N/AThe times() function returns elapsed realtime since some point in the past
1N/A(such as system startup), user and system times for this process, and user
1N/Aand system times used by child processes. All times are returned in clock
1N/Aticks.
1N/A
1N/A ($realtime, $user, $system, $cuser, $csystem) = POSIX::times();
1N/A
1N/ANote: Perl's builtin C<times()> function returns four values, measured in
1N/Aseconds.
1N/A
1N/A=item tmpfile
1N/A
1N/AUse method C<IO::File::new_tmpfile()> instead, or see L<File::Temp>.
1N/A
1N/A=item tmpnam
1N/A
1N/AReturns a name for a temporary file.
1N/A
1N/A $tmpfile = POSIX::tmpnam();
1N/A
1N/AFor security reasons, which are probably detailed in your system's
1N/Adocumentation for the C library tmpnam() function, this interface
1N/Ashould not be used; instead see L<File::Temp>.
1N/A
1N/A=item tolower
1N/A
1N/AThis is identical to the C function, except that it can apply to a single
1N/Acharacter or to a whole string. Consider using the C<lc()> function,
1N/Asee L<perlfunc/lc>, or the equivalent C<\L> operator inside doublequotish
1N/Astrings.
1N/A
1N/A=item toupper
1N/A
1N/AThis is identical to the C function, except that it can apply to a single
1N/Acharacter or to a whole string. Consider using the C<uc()> function,
1N/Asee L<perlfunc/uc>, or the equivalent C<\U> operator inside doublequotish
1N/Astrings.
1N/A
1N/A=item ttyname
1N/A
1N/AThis is identical to the C function C<ttyname()> for returning the
1N/Aname of the current terminal.
1N/A
1N/A=item tzname
1N/A
1N/ARetrieves the time conversion information from the C<tzname> variable.
1N/A
1N/A POSIX::tzset();
1N/A ($std, $dst) = POSIX::tzname();
1N/A
1N/A=item tzset
1N/A
1N/AThis is identical to the C function C<tzset()> for setting
1N/Athe current timezone based on the environment variable C<TZ>,
1N/Ato be used by C<ctime()>, C<localtime()>, C<mktime()>, and C<strftime()>
1N/Afunctions.
1N/A
1N/A=item umask
1N/A
1N/AThis is identical to Perl's builtin C<umask()> function
1N/Afor setting (and querying) the file creation permission mask,
1N/Asee L<perlfunc/umask>.
1N/A
1N/A=item uname
1N/A
1N/AGet name of current operating system.
1N/A
1N/A ($sysname, $nodename, $release, $version, $machine) = POSIX::uname();
1N/A
1N/ANote that the actual meanings of the various fields are not
1N/Athat well standardized, do not expect any great portability.
1N/AThe C<$sysname> might be the name of the operating system,
1N/Athe C<$nodename> might be the name of the host, the C<$release>
1N/Amight be the (major) release number of the operating system,
1N/Athe C<$version> might be the (minor) release number of the
1N/Aoperating system, and the C<$machine> might be a hardware identifier.
1N/AMaybe.
1N/A
1N/A=item ungetc
1N/A
1N/AUse method C<IO::Handle::ungetc()> instead.
1N/A
1N/A=item unlink
1N/A
1N/AThis is identical to Perl's builtin C<unlink()> function
1N/Afor removing files, see L<perlfunc/unlink>.
1N/A
1N/A=item utime
1N/A
1N/AThis is identical to Perl's builtin C<utime()> function
1N/Afor changing the time stamps of files and directories,
1N/Asee L<perlfunc/utime>.
1N/A
1N/A=item vfprintf
1N/A
1N/Avfprintf() is C-specific, see L<perlfunc/printf> instead.
1N/A
1N/A=item vprintf
1N/A
1N/Avprintf() is C-specific, see L<perlfunc/printf> instead.
1N/A
1N/A=item vsprintf
1N/A
1N/Avsprintf() is C-specific, see L<perlfunc/sprintf> instead.
1N/A
1N/A=item wait
1N/A
1N/AThis is identical to Perl's builtin C<wait()> function,
1N/Asee L<perlfunc/wait>.
1N/A
1N/A=item waitpid
1N/A
1N/AWait for a child process to change state. This is identical to Perl's
1N/Abuiltin C<waitpid()> function, see L<perlfunc/waitpid>.
1N/A
1N/A $pid = POSIX::waitpid( -1, POSIX::WNOHANG );
1N/A print "status = ", ($? / 256), "\n";
1N/A
1N/A=item wcstombs
1N/A
1N/AThis is identical to the C function C<wcstombs()>.
1N/APerl does not have any support for the wide and multibyte
1N/Acharacters of the C standards, so this might be a rather
1N/Auseless function.
1N/A
1N/A=item wctomb
1N/A
1N/AThis is identical to the C function C<wctomb()>.
1N/APerl does not have any support for the wide and multibyte
1N/Acharacters of the C standards, so this might be a rather
1N/Auseless function.
1N/A
1N/A=item write
1N/A
1N/AWrite to a file. This uses file descriptors such as those obtained by
1N/Acalling C<POSIX::open>.
1N/A
1N/A $fd = POSIX::open( "foo", &POSIX::O_WRONLY );
1N/A $buf = "hello";
1N/A $bytes = POSIX::write( $b, $buf, 5 );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/ASee also L<perlfunc/syswrite>.
1N/A
1N/A=back
1N/A
1N/A=head1 CLASSES
1N/A
1N/A=head2 POSIX::SigAction
1N/A
1N/A=over 8
1N/A
1N/A=item new
1N/A
1N/ACreates a new C<POSIX::SigAction> object which corresponds to the C
1N/AC<struct sigaction>. This object will be destroyed automatically when it is
1N/Ano longer needed. The first parameter is the fully-qualified name of a sub
1N/Awhich is a signal-handler. The second parameter is a C<POSIX::SigSet>
1N/Aobject, it defaults to the empty set. The third parameter contains the
1N/AC<sa_flags>, it defaults to 0.
1N/A
1N/A $sigset = POSIX::SigSet->new(SIGINT, SIGQUIT);
1N/A $sigaction = POSIX::SigAction->new( \&main::handler, $sigset, &POSIX::SA_NOCLDSTOP );
1N/A
1N/AThis C<POSIX::SigAction> object is intended for use with the C<POSIX::sigaction()>
1N/Afunction.
1N/A
1N/A=back
1N/A
1N/A=over 8
1N/A
1N/A=item handler
1N/A
1N/A=item mask
1N/A
1N/A=item flags
1N/A
1N/Aaccessor functions to get/set the values of a SigAction object.
1N/A
1N/A $sigset = $sigaction->mask;
1N/A $sigaction->flags(&POSIX::SA_RESTART);
1N/A
1N/A=item safe
1N/A
1N/Aaccessor function for the "safe signals" flag of a SigAction object; see
1N/AL<perlipc> for general information on safe (a.k.a. "deferred") signals. If
1N/Ayou wish to handle a signal safely, use this accessor to set the "safe" flag
1N/Ain the C<POSIX::SigAction> object:
1N/A
1N/A $sigaction->safe(1);
1N/A
1N/AYou may also examine the "safe" flag on the output action object which is
1N/Afilled in when given as the third parameter to C<POSIX::sigaction()>:
1N/A
1N/A sigaction(SIGINT, $new_action, $old_action);
1N/A if ($old_action->safe) {
1N/A # previous SIGINT handler used safe signals
1N/A }
1N/A
1N/A=back
1N/A
1N/A=head2 POSIX::SigSet
1N/A
1N/A=over 8
1N/A
1N/A=item new
1N/A
1N/ACreate a new SigSet object. This object will be destroyed automatically
1N/Awhen it is no longer needed. Arguments may be supplied to initialize the
1N/Aset.
1N/A
1N/ACreate an empty set.
1N/A
1N/A $sigset = POSIX::SigSet->new;
1N/A
1N/ACreate a set with SIGUSR1.
1N/A
1N/A $sigset = POSIX::SigSet->new( &POSIX::SIGUSR1 );
1N/A
1N/A=item addset
1N/A
1N/AAdd a signal to a SigSet object.
1N/A
1N/A $sigset->addset( &POSIX::SIGUSR2 );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item delset
1N/A
1N/ARemove a signal from the SigSet object.
1N/A
1N/A $sigset->delset( &POSIX::SIGUSR2 );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item emptyset
1N/A
1N/AInitialize the SigSet object to be empty.
1N/A
1N/A $sigset->emptyset();
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item fillset
1N/A
1N/AInitialize the SigSet object to include all signals.
1N/A
1N/A $sigset->fillset();
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item ismember
1N/A
1N/ATests the SigSet object to see if it contains a specific signal.
1N/A
1N/A if( $sigset->ismember( &POSIX::SIGUSR1 ) ){
1N/A print "contains SIGUSR1\n";
1N/A }
1N/A
1N/A=back
1N/A
1N/A=head2 POSIX::Termios
1N/A
1N/A=over 8
1N/A
1N/A=item new
1N/A
1N/ACreate a new Termios object. This object will be destroyed automatically
1N/Awhen it is no longer needed. A Termios object corresponds to the termios
1N/AC struct. new() mallocs a new one, getattr() fills it from a file descriptor,
1N/Aand setattr() sets a file descriptor's parameters to match Termios' contents.
1N/A
1N/A $termios = POSIX::Termios->new;
1N/A
1N/A=item getattr
1N/A
1N/AGet terminal control attributes.
1N/A
1N/AObtain the attributes for stdin.
1N/A
1N/A $termios->getattr()
1N/A
1N/AObtain the attributes for stdout.
1N/A
1N/A $termios->getattr( 1 )
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item getcc
1N/A
1N/ARetrieve a value from the c_cc field of a termios object. The c_cc field is
1N/Aan array so an index must be specified.
1N/A
1N/A $c_cc[1] = $termios->getcc(1);
1N/A
1N/A=item getcflag
1N/A
1N/ARetrieve the c_cflag field of a termios object.
1N/A
1N/A $c_cflag = $termios->getcflag;
1N/A
1N/A=item getiflag
1N/A
1N/ARetrieve the c_iflag field of a termios object.
1N/A
1N/A $c_iflag = $termios->getiflag;
1N/A
1N/A=item getispeed
1N/A
1N/ARetrieve the input baud rate.
1N/A
1N/A $ispeed = $termios->getispeed;
1N/A
1N/A=item getlflag
1N/A
1N/ARetrieve the c_lflag field of a termios object.
1N/A
1N/A $c_lflag = $termios->getlflag;
1N/A
1N/A=item getoflag
1N/A
1N/ARetrieve the c_oflag field of a termios object.
1N/A
1N/A $c_oflag = $termios->getoflag;
1N/A
1N/A=item getospeed
1N/A
1N/ARetrieve the output baud rate.
1N/A
1N/A $ospeed = $termios->getospeed;
1N/A
1N/A=item setattr
1N/A
1N/ASet terminal control attributes.
1N/A
1N/ASet attributes immediately for stdout.
1N/A
1N/A $termios->setattr( 1, &POSIX::TCSANOW );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item setcc
1N/A
1N/ASet a value in the c_cc field of a termios object. The c_cc field is an
1N/Aarray so an index must be specified.
1N/A
1N/A $termios->setcc( &POSIX::VEOF, 1 );
1N/A
1N/A=item setcflag
1N/A
1N/ASet the c_cflag field of a termios object.
1N/A
1N/A $termios->setcflag( $c_cflag | &POSIX::CLOCAL );
1N/A
1N/A=item setiflag
1N/A
1N/ASet the c_iflag field of a termios object.
1N/A
1N/A $termios->setiflag( $c_iflag | &POSIX::BRKINT );
1N/A
1N/A=item setispeed
1N/A
1N/ASet the input baud rate.
1N/A
1N/A $termios->setispeed( &POSIX::B9600 );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item setlflag
1N/A
1N/ASet the c_lflag field of a termios object.
1N/A
1N/A $termios->setlflag( $c_lflag | &POSIX::ECHO );
1N/A
1N/A=item setoflag
1N/A
1N/ASet the c_oflag field of a termios object.
1N/A
1N/A $termios->setoflag( $c_oflag | &POSIX::OPOST );
1N/A
1N/A=item setospeed
1N/A
1N/ASet the output baud rate.
1N/A
1N/A $termios->setospeed( &POSIX::B9600 );
1N/A
1N/AReturns C<undef> on failure.
1N/A
1N/A=item Baud rate values
1N/A
1N/AB38400 B75 B200 B134 B300 B1800 B150 B0 B19200 B1200 B9600 B600 B4800 B50 B2400 B110
1N/A
1N/A=item Terminal interface values
1N/A
1N/ATCSADRAIN TCSANOW TCOON TCIOFLUSH TCOFLUSH TCION TCIFLUSH TCSAFLUSH TCIOFF TCOOFF
1N/A
1N/A=item c_cc field values
1N/A
1N/AVEOF VEOL VERASE VINTR VKILL VQUIT VSUSP VSTART VSTOP VMIN VTIME NCCS
1N/A
1N/A=item c_cflag field values
1N/A
1N/ACLOCAL CREAD CSIZE CS5 CS6 CS7 CS8 CSTOPB HUPCL PARENB PARODD
1N/A
1N/A=item c_iflag field values
1N/A
1N/ABRKINT ICRNL IGNBRK IGNCR IGNPAR INLCR INPCK ISTRIP IXOFF IXON PARMRK
1N/A
1N/A=item c_lflag field values
1N/A
1N/AECHO ECHOE ECHOK ECHONL ICANON IEXTEN ISIG NOFLSH TOSTOP
1N/A
1N/A=item c_oflag field values
1N/A
1N/AOPOST
1N/A
1N/A=back
1N/A
1N/A=head1 PATHNAME CONSTANTS
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/A_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
1N/A
1N/A=back
1N/A
1N/A=head1 POSIX CONSTANTS
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/A_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
1N/A
1N/A=back
1N/A
1N/A=head1 SYSTEM CONFIGURATION
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/A_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
1N/A
1N/A=back
1N/A
1N/A=head1 ERRNO
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/AE2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF
1N/AEBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ
1N/AEDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS EINTR
1N/AEINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE ENAMETOOLONG
1N/AENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODEV ENOENT ENOEXEC
1N/AENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR
1N/AENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE
1N/AEPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART EROFS
1N/AESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS
1N/AETXTBSY EUSERS EWOULDBLOCK EXDEV
1N/A
1N/A=back
1N/A
1N/A=head1 FCNTL
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/AFD_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
1N/A
1N/A=back
1N/A
1N/A=head1 FLOAT
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/ADBL_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
1N/A
1N/A=back
1N/A
1N/A=head1 LIMITS
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/AARG_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
1N/A
1N/A=back
1N/A
1N/A=head1 LOCALE
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/ALC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME
1N/A
1N/A=back
1N/A
1N/A=head1 MATH
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/AHUGE_VAL
1N/A
1N/A=back
1N/A
1N/A=head1 SIGNAL
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/ASA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND SA_RESTART
1N/ASA_SIGINFO SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT
1N/ASIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU
1N/ASIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK
1N/ASIG_UNBLOCK
1N/A
1N/A=back
1N/A
1N/A=head1 STAT
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/AS_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
1N/A
1N/A=item Macros
1N/A
1N/AS_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
1N/A
1N/A=back
1N/A
1N/A=head1 STDLIB
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/AEXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX RAND_MAX
1N/A
1N/A=back
1N/A
1N/A=head1 STDIO
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/ABUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid L_tmpname TMP_MAX
1N/A
1N/A=back
1N/A
1N/A=head1 TIME
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/ACLK_TCK CLOCKS_PER_SEC
1N/A
1N/A=back
1N/A
1N/A=head1 UNISTD
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/AR_OK SEEK_CUR SEEK_END SEEK_SET STDIN_FILENO STDOUT_FILENO STDERR_FILENO W_OK X_OK
1N/A
1N/A=back
1N/A
1N/A=head1 WAIT
1N/A
1N/A=over 8
1N/A
1N/A=item Constants
1N/A
1N/AWNOHANG WUNTRACED
1N/A
1N/A=over 16
1N/A
1N/A=item WNOHANG
1N/A
1N/ADo not suspend the calling process until a child process
1N/Achanges state but instead return immediately.
1N/A
1N/A=item WUNTRACED
1N/A
1N/ACatch stopped child processes.
1N/A
1N/A=back
1N/A
1N/A=item Macros
1N/A
1N/AWIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG WIFSTOPPED WSTOPSIG
1N/A
1N/A=over 16
1N/A
1N/A=item WIFEXITED
1N/A
1N/AWIFEXITED($?) returns true if the child process exited normally
1N/A(C<exit()> or by falling off the end of C<main()>)
1N/A
1N/A=item WEXITSTATUS
1N/A
1N/AWEXITSTATUS($?) returns the normal exit status of the child process
1N/A(only meaningful if WIFEXITED($?) is true)
1N/A
1N/A=item WIFSIGNALED
1N/A
1N/AWIFSIGNALED($?) returns true if the child process terminated because
1N/Aof a signal
1N/A
1N/A=item WTERMSIG
1N/A
1N/AWTERMSIG($?) returns the signal the child process terminated for
1N/A(only meaningful if WIFSIGNALED($?) is true)
1N/A
1N/A=item WIFSTOPPED
1N/A
1N/AWIFSTOPPED($?) returns true if the child process is currently stopped
1N/A(can happen only if you specified the WUNTRACED flag to waitpid())
1N/A
1N/A=item WSTOPSIG
1N/A
1N/AWSTOPSIG($?) returns the signal the child process was stopped for
1N/A(only meaningful if WIFSTOPPED($?) is true)
1N/A
1N/A=back
1N/A
1N/A=back
1N/A