5
     �¿ÁÀ      File not found.
  $   	ˆl—Ðz¾”Êe¶…6 ¸Û7yLZ7ÿÃ„x�ÏÂÁ ?÷     	=head1 NAME

POSIX - Perl interface to IEEE Std 1003.1

=head1 SYNOPSIS

    use POSIX ();
    use POSIX qw(setsid);
    use POSIX qw(:errno_h :fcntl_h);

    printf "EINTR is %d\n", EINTR;

    $sess_id = POSIX::setsid();

    $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644);
	# note: that's a filedescriptor, *NOT* a filehandle

=head1 DESCRIPTION

The POSIX module permits you to access all (or nearly all) the standard
POSIX 1003.1 identifiers.  Many of these identifiers have been given Perl-ish
interfaces.

This document gives a condensed list of the features available in the POSIX
module.  Consult your operating system's manpages for general information on
most features.  Consult L<perlfunc> for functions which are noted as being
identical or almost identical to Perl's builtin functions.

The first section describes POSIX functions from the 1003.1 specification.
The second section describes some classes for signal objects, TTY objects,
and other miscellaneous objects.  The remaining sections list various
constants and macros in an organization which roughly follows IEEE Std
1003.1b-1993.

=head1 CAVEATS

I<Everything is exported by default> (with a handful of exceptions).
This is an unfortunate backwards compatibility feature and its use is
B<strongly L<discouraged|perlpolicy/discouraged>>.
You should either prevent the exporting (by saying S<C<use POSIX ();>>,
as usual) and then use fully qualified names (e.g. C<POSIX::SEEK_END>),
or give an explicit import list.
If you do neither and opt for the default (as in S<C<use POSIX;>>), you
will import I<hundreds and hundreds> of symbols into your namespace.

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 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 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 C<ICANON> macro after
all.  This could be construed to be a bug.

=head1 FUNCTIONS

=over 8

=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.

Note that when using threads and in Linux this is B<not> a good way to
exit a thread because in Linux processes and threads are kind of the
same thing (Note: while this is the situation in early 2003 there are
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 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 C<abs>

This is identical to Perl's builtin C<abs()> function, returning the absolute
value of its numerical argument (except that C<POSIX::abs()> must be provided
an explicit value (rather than relying on an implicit C<$_>):

    $absolute_value = POSIX::abs(42);   # good

    $absolute_value = POSIX::abs();     # throws exception

=item C<access>

Determines the accessibility of a file.

	if( POSIX::access( "/", &POSIX::R_OK ) ){
		print "have read permission\n";
	}

Returns C<undef> on failure.  Note: do not use C<access()> for
security purposes.  Between the C<access()> call and the operation
you are preparing for the permissions might change: a classic
I<race condition>.

=item C<acos>

T