MirOS Manual: Fcntl(3p)


Fcntl(3p)       Perl Programmers Reference Guide        Fcntl(3p)

NAME

     Fcntl - load the C Fcntl.h defines

SYNOPSIS

         use Fcntl;
         use Fcntl qw(:DEFAULT :flock);

DESCRIPTION

     This module is just a translation of the C fcntl.h file.
     Unlike the old mechanism of requiring a translated fcntl.ph
     file, this uses the h2xs program (see the Perl source dis-
     tribution) and your native C compiler.  This means that it
     has a far more likely chance of getting the numbers right.

NOTE

     Only "#define" symbols get translated; you must still
     correctly pack up your own arguments to pass as args for
     locking functions, etc.

EXPORTED SYMBOLS

     By default your system's F_* and O_* constants (eg, F_DUPFD
     and O_CREAT) and the FD_CLOEXEC constant are exported into
     your namespace.

     You can request that the flock() constants (LOCK_SH,
     LOCK_EX, LOCK_NB and LOCK_UN) be provided by using the tag
     ":flock".  See Exporter.

     You can request that the old constants (FAPPEND, FASYNC,
     FCREAT, FDEFER, FEXCL, FNDELAY, FNONBLOCK, FSYNC, FTRUNC) be
     provided for compatibility reasons by using the tag ":Fcom-
     pat".  For new applications the newer versions of these con-
     stants are suggested (O_APPEND, O_ASYNC, O_CREAT, O_DEFER,
     O_EXCL, O_NDELAY, O_NONBLOCK, O_SYNC, O_TRUNC).

     For ease of use also the SEEK_* constants (for seek() and
     sysseek(), e.g. SEEK_END) and the S_I* constants (for
     chmod() and stat()) are available for import.  They can be
     imported either separately or using the tags ":seek" and
     ":mode".

     Please refer to your native fcntl(2), open(2), fseek(3),
     lseek(2) (equal to Perl's seek() and sysseek(), respec-
     tively), and chmod(2) documentation to see what constants
     are implemented in your system.

     See perlopentut to learn about the uses of the O_* constants
     with sysopen().

     See "seek" in perlfunc and "sysseek" in perlfunc about the
     SEEK_* constants.

perl v5.8.8                2005-02-05                           1

Fcntl(3p)       Perl Programmers Reference Guide        Fcntl(3p)

     See "stat" in perlfunc about the S_I* constants.

perl v5.8.8                2005-02-05                           2

Generated on 2014-07-04 21:17:45 by $MirOS: src/scripts/roff2htm,v 1.79 2014/02/10 00:36:11 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002‒2014 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.