Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
XP is just a number
 
PerlMonks  

perlman:lib:Fcntl

by root (Scribe)
on Dec 23, 1999 at 00:49 UTC ( #1111=perlfunc: print w/ replies, xml ) Need Help??

lib:Fcntl

See the current Perl documentation for lib:Fcntl.

Here is our local, out-dated (pre-5.6) version:


Fcntl - load the C Fcntl.h defines



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



This module is just a translation of the C fnctl.h file. Unlike the old mechanism of requiring a translated fnctl.ph file, this uses the h2xs program (see the Perl source distribution) 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 :Fcompat. For new applications the newer versions of these constants are suggested (O_APPEND, O_ASYNC, O_CREAT, O_DEFER, O_EXCL, O_NDELAY, O_NONBLOCK, O_SYNC, O_TRUNC).

Please refer to your native fcntl() and open() documentation to see what constants are implemented in your system.


Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (18)
As of 2014-04-16 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (433 votes), past polls