File-FcntlLock-0.14/0000755000175000017500000000000011652774016012663 5ustar jensjensFile-FcntlLock-0.14/FcntlLock.xs0000644000175000017500000000535311600654155015116 0ustar jensjens/* This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Copyright (C) 2002-2011 Jens Thoms Toerring */ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include MODULE = File::FcntlLock PACKAGE = File::FcntlLock PROTOTYPES: ENABLE SV * C_fcntl_lock( fd, function, flock_hash, int_err ) int fd int function SV *flock_hash SV *int_err INIT: struct flock flock_struct; HV *fs; SV **sv_type, **sv_whence, **sv_start, **sv_len; sv_setiv( int_err, 0 ); if ( ! SvROK( flock_hash ) ) { sv_setiv( int_err, 1 ); XSRETURN_UNDEF; } fs = ( HV * ) SvRV( flock_hash ); CODE: /* Let's be careful and not assume that anything at all will work */ if ( ( sv_type = hv_fetch( fs, "l_type", 6, 0 ) ) == NULL || ( sv_whence = hv_fetch( fs, "l_whence", 8, 0 ) ) == NULL || ( sv_start = hv_fetch( fs, "l_start", 7, 0 ) ) == NULL || ( sv_len = hv_fetch( fs, "l_len", 5, 0 ) ) == NULL ) { sv_setiv( int_err, 1 ); XSRETURN_UNDEF; } flock_struct.l_type = SvIV( *sv_type ); flock_struct.l_whence = SvIV( *sv_whence ); flock_struct.l_start = SvIV( *sv_start ); flock_struct.l_len = SvIV( *sv_len ); /* Now call fcntl(2) - if we want the lock immediately but some other process is holding it we return 'undef' (people can find out about the reasons by checking errno). The same happens if we wait for the lock but receive a signal before we obtain the lock. */ if ( fcntl( fd, function, &flock_struct ) != 0 ) XSRETURN_UNDEF; /* Now to find out who's holding the lock we now must unpack the structure we got back from fcntl(2) and store it in the hash we got passed. */ if ( function == F_GETLK ) { hv_store( fs, "l_type", 6, newSViv( flock_struct.l_type ), 0 ); hv_store( fs, "l_whence", 8, newSViv( flock_struct.l_whence ), 0 ); hv_store( fs, "l_start", 7, newSViv( flock_struct.l_start ), 0 ); hv_store( fs, "l_len", 5, newSViv( flock_struct.l_len ), 0 ); hv_store( fs, "l_pid", 5, newSViv( flock_struct.l_pid ), 0 ); } /* Return the systems return value of the fcntl(2) call (which is 0) but in a way that can't be mistaken as meaning false (shamelessly stolen from pp_sys.c in the the Perl sources). */ RETVAL = newSVpvn( "0 but true", 10 ); OUTPUT: RETVAL File-FcntlLock-0.14/t/0000755000175000017500000000000011652774016013126 5ustar jensjensFile-FcntlLock-0.14/t/FcntlLock.t0000644000175000017500000001465111652757204015201 0ustar jensjens# -*- cperl -*- # # This program is free software; you can redistribute it and/or modify it # under the same terms as Perl itself. # # Copyright (C) 2002-2011 Jens Thoms Toerring # # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl FcntlLock.t' ######################### use Test; use strict; use warnings; BEGIN { plan tests => 11 }; use POSIX; use Errno; use File::FcntlLock; ############################################## # 1. Most basic test: create an object my $fs = new File::FcntlLock; ok( defined $fs and $fs->isa( 'File::FcntlLock' ) ); ############################################## # 2. Also basic: create an object with initalization and check thet the # properties of the created object are what they are supposed to be $fs = new File::FcntlLock l_type => F_RDLCK, l_whence => SEEK_CUR, l_start => 123, l_len => 234; ok( defined $fs and $fs->isa( 'File::FcntlLock' ) and $fs->l_type == F_RDLCK and $fs->l_whence == SEEK_CUR and $fs->l_start == 123 and $fs->l_len == 234 ); ############################################## # 3. Change l_type property to F_UNLCK and check $fs->l_type( F_UNLCK ); ok( $fs->l_type, F_UNLCK ); ############################################## # 4. Change l_type property to F_WRLCK and check $fs->l_type( F_WRLCK ); ok( $fs->l_type, F_WRLCK ); ############################################## # 5. Change l_whence property to SEEK_END and check $fs->l_whence( SEEK_END ); ok( $fs->l_whence, SEEK_END ); ############################################## # 6. Change l_whence property to SEEK_SET and check $fs->l_whence( SEEK_SET ); ok( $fs->l_whence, SEEK_SET ); ############################################## # 7. Change l_start property and check $fs->l_start( 20 ); ok( $fs->l_start, 20 ); ############################################## # 8. Change l_len property and check $fs->l_len( 3 ); ok( $fs->l_len, 3 ); ############################################## # 9. Test if we can get a read lock on a file and release it again my $fh; if ( defined open $fh, '>', './fcntllock_test' ) { close $fh; if ( defined open $fh, '<', './fcntllock_test' ) { $fs->l_type( F_RDLCK ); $fs->l_start( 0 ); # that's all GNU Hurd can handle $fs->l_len( 0 ); # ditto $fs->l_whence( SEEK_SET ); # ditto my $res = $fs->lock( $fh, F_SETLK ); unlink './fcntllock_test'; if ( defined $res ) { $fs->l_type( F_UNLCK ); $res = $fs->lock( $fh, F_SETLK ); print "# Dropping read lock failed: $! (" . $fs->lock_errno . ")\n" unless defined $res; } else { print "# Read lock failed: $! (" . $fs->lock_errno . ")\n"; } close $fh; ok( defined $res ); } else { print "# Can't open a file for reading: $!\n"; ok( 0 ); } } else { print "# Can't create a test file: $!\n"; ok( 0 ); } ############################################## # 10. Test if we can get an write lock on a test file and release it again if ( defined open $fh, '>', './fcntllock_test' ) { unlink './fcntllock_test'; $fs->l_type( F_WRLCK ); my $res = $fs->lock( $fh, F_SETLK ); if ( defined $res ) { $fs->l_type( F_UNLCK ); $res = $fs->lock( $fh, F_SETLK ); print "# Dropping write lock failed: $! (" . $fs->lock_errno . ")\n" unless defined $res; close( $fh ); } else { print "# Write lock failed: $! (" . $fs->lock_errno . ")\n"; } ok( defined $res ); } else { print "# Can't open a file for writing: $!\n"; ok( 0 ); } ############################################## # 11. Now a "real" test: the child process grabs a write lock on a test file # for 2 secs while the parent repeatedly tests if it can get the lock. # After the child finally releases the lock the parent should be able to # obtain and again release it. Note that there are systems that don't # support F_GETLK and in that case we can only try to obtain the lock # directly and check for the reason it failed. if ( defined open $fh, '>', './fcntllock_test' ) { unlink './fcntllock_test'; $fs = $fs->new( l_type => F_WRLCK, l_whence => SEEK_SET, l_start => 0, l_len => 0 ); if ( my $pid = fork ) { sleep 1; # leave some time for the child to get the lock my $failed = 1; while ( 1 ) { last if $pid == waitpid( $pid, WNOHANG ) and $?; # F_GETLK is not supported on all systems in which case errno # is set to ENOSYS. In that case we have to resort to trying to # obtain the lock directly and testing the reasons for failure, # not being able to obtain information about the holder of the # lock. if ( ! defined $fs->lock( $fh, F_GETLK ) ) { last unless $!{ ENOSYS }; $fs->l_type( F_WRLCK ); if ( ! defined $fs->lock( $fh, F_SETLK ) ) { last unless $!{ EACCES } or ! $!{ EAGAIN }; } else { $fs->l_type( F_UNLCK ); last unless defined $fs->lock( $fh, F_SETLK ); $failed = 0; last; } } else { last if $fs->l_type == F_WRLCK and $fs->l_pid != $pid; if ( $fs->l_type == F_UNLCK ) { $failed = 0; last; } } select undef, undef, undef, 0.25; } if ( ! $failed ) { ok( $fs->l_type( F_WRLCK ), $fs->lock( $fh, F_SETLK ) and $fs->l_type( F_UNLCK ), $fs->lock( $fh, F_SETLK ) ); } else { ok( 0 ); } close $fh; } elsif ( defined $pid ) { # child's code $fs->lock( $fh, F_SETLKW ) or exit 1; sleep 2; $fs->l_type( F_UNLCK ); $fs->lock( $fh, F_SETLK ) or exit 1; exit 0; } else { print "# Can't fork: $!\n"; ok( 0 ); } } else { print "# Can't open a file for writing: $!\n"; ok( 0 ); } # Local variables: # tab-width: 4 # indent-tabs-mode: nil # End: File-FcntlLock-0.14/lib/0000755000175000017500000000000011652774016013431 5ustar jensjensFile-FcntlLock-0.14/lib/File/0000755000175000017500000000000011652774016014310 5ustar jensjensFile-FcntlLock-0.14/lib/File/FcntlLock.pm0000644000175000017500000003372111652773207016534 0ustar jensjens# -*- cperl -*- # # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # # Copyright (C) 2002-2011 Jens Thoms Toerring package File::FcntlLock; use 5.006; use strict; use warnings; use POSIX; use Errno; use Carp; require Exporter; require DynaLoader; our @ISA = qw( Exporter DynaLoader ); # Items to export into callers namespace by default. our @EXPORT = qw( F_GETLK F_SETLK F_SETLKW F_RDLCK F_WRLCK F_UNLCK SEEK_SET SEEK_CUR SEEK_END ); our $VERSION = '0.14'; =pod =head1 NAME File::FcntlLock - File locking with L =head1 SYNOPSIS use File::FcntlLock; my $fs = new File::FcntlLock; $fs->l_type( F_RDLCK ); $fs->l_whence( SEEK_CUR ); $fs->l_start( 100 ); $fs->l_len( 123 ); open my $fh, '<', 'file_name' or die "Can't open file: $!\n"; $fs->lock( $fh, F_SETLK ) or print "Locking failed: " . $fs->error . "\n"; $fs->l_type( F_UNLCK ); $fs->lock( $fh, F_SETLK ) or print "Unlocking failed: " . $fs->error . "\n"; =head1 DESCRIPTION File locking in Perl is usually done using the L function. Unfortunately, this only allows locks on whole files and is often implemented in terms of L, which has some shortcomings. Using this module file locking via L can be done (obviously, this restricts the use of the module to systems that have a L system call). Before a file (or parts of a file) can be locked, an object simulating a flock structure must be created and its properties set. Afterwards, by calling the C method a lock can be set or it can be determined if and which process currently holds the lock. =cut # Set up a hash with the error messages, but only for errno's that Errno # knows about. The texts represent what's written in SUSv3 and in the man # pages for Linux, TRUE64, OpenBSD3 and Solaris8. my %fcntl_error_texts; BEGIN { my $err; if ( $err = eval { &Errno::EACCES } ) { $fcntl_error_texts{ $err } = "File or segment already locked " . "by other process(es) or file is " . "mmap()ed to virtual memory"; } if ( $err = eval { &Errno::EAGAIN } ) { $fcntl_error_texts{ $err } = "File or segment already locked " . "by other process(es)"; } if ( $err = eval { &Errno::EBADF } ) { $fcntl_error_texts{ $err } = "Not an open file handle or descriptor " . "or not open for writing (with F_WRLCK)" . " or reading (with F_RDLCK)"; } if ( $err = eval { &Errno::EDEADLK } ) { $fcntl_error_texts{ $err } = "Operation would cause a deadlock"; } if ( $err = eval { &Errno::EFAULT } ) { $fcntl_error_texts{ $err } = "Lock outside accessible address space " . "or to many locked regions"; } if ( $err = eval { &Errno::EINTR } ) { $fcntl_error_texts{ $err } = "Operation interrupted by a signal"; } if ( $err = eval { &Errno::ENOLCK } ) { $fcntl_error_texts{ $err } = "Too many segment locks open, lock " . "table full or remote locking protocol " . "failure (e.g. NFS)"; } if ( $err = eval { &Errno::EINVAL } ) { $fcntl_error_texts{ $err } = "Illegal parameter or file does not " . "support locking"; } if ( $err = eval { &Errno::EOVERFLOW } ) { $fcntl_error_texts{ $err } = "One of the parameters to be returned " . "can not be represented correctly"; } if ( $err = eval { &Errno::ENETUNREACH } ) { $fcntl_error_texts{ $err } = "File is on remote machine that can " . "not be reached anymore"; } if ( $err = eval { &Errno::ENOLINK } ) { $fcntl_error_texts{ $err } = "File is on remote machine that can " . "not be reached anymore"; } } bootstrap File::FcntlLock $VERSION; ########################################################### =pod To create a new object representing a flock structure call C: $fs = new File::FcntlLock; You also can pass the C method a set of key-value pairs to initialize the objects properties, e.g. use $fs = new File::FcntlLock l_type => F_WRLCK, l_whence => SEEK_SET, l_start => 0, l_len => 100; if you plan to obtain a write lock for the first 100 bytes of a file. =cut sub new { my $inv = shift; my $pkg = ref( $inv ) || $inv; my $self = { l_type => F_RDLCK, l_whence => SEEK_SET, l_start => 0, l_len => 0, l_pid => 0, errno => undef, error_message => undef }; if ( @_ % 2 ) { carp "Missing value in key-value initializer list " . "in call of new method"; return; } while ( @_ ) { my $key = shift; no strict 'refs'; unless ( defined &$key ) { carp "Flock structure has no '$key' member " . "in call of new method"; return; } &$key( $self, shift ); use strict 'refs'; } bless $self, $pkg; } ########################################################### =pod Once you have created the object simulating the flock structure the following methods allow to query and in most cases also to modify the properties of the object. =over 4 =item C If called without an argument returns the current setting of the lock type, otherwise the lock type is set to the argument, which must be either C, C or C (for read lock, write lock or unlock). =cut sub l_type { my $flock_struct = shift; if ( @_ ) { my $l_type = shift; unless ( $l_type == F_RDLCK or $l_type == F_WRLCK or $l_type == F_UNLCK ) { carp "Invalid argument in call of l_type method"; return; } $flock_struct->{ l_type } = $l_type; } return $flock_struct->{ l_type }; } ########################################################### =pod =item C Queries or sets the C property of the flock object, determining if the C value is relative to the start of the file, to the current position in the file or to the end of the file. The corresponding values are C, C and C. See also the man page for L. =cut sub l_whence { my $flock_struct = shift; if ( @_ ) { my $l_whence = shift; unless ( $l_whence == SEEK_SET or $l_whence == SEEK_CUR or $l_whence == SEEK_END ) { carp "Invalid argument in call of l_whence method"; return; } $flock_struct->{ l_whence } = $l_whence; } return $flock_struct->{ l_whence }; } ########################################################### =pod =item C Queries or sets the start position (offset) of the lock in the file according to the mode selected by the C member. See also the man page for L. =cut sub l_start { my $flock_struct = shift; $flock_struct->{ l_start } = shift if @_; return $flock_struct->{ l_start }; } ########################################################### =pod =item C Queries or sets the length of the region (in bytes) in the file to be locked. A value of 0 is interpreted as to mean a lock (starting at C) up to the very end of the file. According to SUSv3 negative values for C are allowed (resulting in a lock ranging from C to C) Unfortunately, not all systems allow negative arguments and will return an error when you try to obtain the lock, so please read the L man page of your system carefully for details. =cut sub l_len { my $flock_struct = shift; $flock_struct->{ l_len } = shift if @_; return $flock_struct->{ l_len }; } ########################################################### =pod =item C This method allows retrieving the PID of a process currently holding the lock after a call of C with C indicated that another process is holding the lock. A call to C with C will fill in this value so C can be called. =back =cut sub l_pid { return shift->{ l_pid }; } ########################################################### =pod When not initialized the flock objects C property is set to C by default, C to C, and both C and C to 0, i.e. the settings for a read lock on the whole file. After having set up the object representing a flock structure you can determine the current holder of a lock or try to obtain a lock by invoking the C method with two arguments, a file handle (or a file descriptor, the module figures out automatically what it got) and a flag indicating the action to be taken, e.g. $fs->lock( $fh, F_SETLK ); There are three values that can be used as the second argument: =over 4 =item C For C the C method determines if and who currently is holding the lock. If no other process is holding the lock the C field is set to C. Otherwise the flock structure object is set to the values that prevent us from obtaining a lock. There may be multiple such blocking processes, including some that are themselves blocked waiting to obtain a lock. C will only make details of one of these visible, and one has no control over which process this is. =item C For C the C method tries to obtain the lock (when C is set to either C or C) or releases the lock (if C is set to C). If a lock is held by some other process the method call returns C and errno is set to C or C (please see the the man page for L for the details). =item C is similar to C but instead of returning an error if the lock can't be obtained immediately it blocks until the lock is obtained. If a signal is received while waiting for the lock the method returns C and errno is set to C. =back On success the method returns the string "0 but true". If the method fails (as indicated by an C return value) you can either immediately evaluate the error number (usingf $!, $ERRNO or $OS_ERROR) or check for it at some later time via the methods discussed below. =cut sub lock { my ( $flock_struct, $fh, $action ) = @_; my ( $ret, $err ); # Figure out the file descriptor - we might get a file handle, a # typeglob or already a file descriptor) and set it to a value which # will make fcntl(2) fail with EBADF if the argument is undefined or # is a file handle that's invalid. my $fd = ( ref( $fh ) or $fh =~ /^\*/ ) ? fileno( $fh ) : $fh; $fd = -1 unless defined $fd; # Set the action argument to something invalid if it's not defined # which then fcntl(2) fails and errno gets set accordingly $action = -1 unless defined $action; if ( $ret = C_fcntl_lock( $fd, $action, $flock_struct, $err ) ) { $flock_struct->{ errno } = $flock_struct->{ error } = undef; } elsif ( $err ) { die "Internal error in File::FcntlLock module detected"; } else { $flock_struct->{ errno } = $! + 0; $flock_struct->{ error } = defined $fcntl_error_texts{ $! + 0 } ? $fcntl_error_texts{ $! + 0 } : "Unexpected error: $!"; } return $ret; } ########################################################### =pod There are three methods for obtaining information about the reason the the last call of C for the object failed: =over 4 =item C Returns the error number from the latest call of C. If the last call did not result in an error the method returns C. =cut sub lock_errno { return shift->{ errno }; } ########################################################### =pod =item C Returns a short description of the error that happened during the latest call of C with the object. Please take the messages with a grain of salt, they represent what SUSv3 (IEEE 1003.1-2001) and the Linux, TRUE64, OpenBSD3 and Solaris8 man pages tell what the error numbers mean, there could be differences (and additional error numbers) on other systems. If there was no error the method returns C. =cut sub error { return shift->{ error }; } ########################################################### =pod =item C While the previous method, C, tries to return a string with some relevance to the locking operation (i.e. "File or segment already locked by other process(es)" instead of "Permission denied") this method returns the "normal" system error message associated with errno. The method returns C if there was no error. =back =cut sub system_error { local $!; my $flock_struct = shift; return $flock_struct->{ errno } ? $! = $flock_struct->{ errno } : undef; } =pod =head2 EXPORT F_GETLK F_SETLK F_SETLKW F_RDLCK F_WRLCK F_UNLCK SEEK_SET SEEK_CUR SEEK_END =head1 CREDITS Thanks to Mark Jason Dominus (MJD) and Benjamin Goldberg (GOLDBB) for helpful discussions, code examples and encouragement. Glenn Herteg pointed out several problems and also helped improve the documentation. Julian Moreno Patino also helped correcting the documentation and pointed out problems arising on GNU Hurd (which seems to have only very rudimentary support for locking with fcntl()). =head1 AUTHOR Jens Thoms Toerring =head1 SEE ALSO L, L, L. =cut 1; # Local variables: # tab-width: 4 # indent-tabs-mode: nil # End: File-FcntlLock-0.14/MANIFEST0000644000175000017500000000024411652774016014014 0ustar jensjensChanges lib/File/FcntlLock.pm FcntlLock.xs Makefile.PL MANIFEST README t/FcntlLock.t META.yml Module meta-data (added by MakeMaker) File-FcntlLock-0.14/Makefile.PL0000644000175000017500000000377111600654144014635 0ustar jensjens# This program is free software; you can redistribute it and/or modify it # under the same terms as Perl itself. # # Copyright (C) 2002-2011 Jens Thoms Toerring use ExtUtils::MakeMaker; use Config; # Check if there's a C compiler we can use. open my $fh, '>cc_test.c' or die "Failed to open a file for writing: $!\n"; print $fh "int main(void)\n{\nreturn 0;\n}\n"; close $fh; if ( system "$Config{cc} -o cc_test cc_test.c" ) { unlink 'cc_test.c'; die "Can't run C compiler '$Config{cc}'\n"; } unlink 'cc_test'; unlink 'cc_test.c'; # Check if using fcntl() works - if the this fails the system may not # have a fcntl(2) system call at all. open $fh, '>fcntl_test.c' or die "Failed to open a file for writing: $!\n"; print $fh < #include #include int main( void ) { int fd = fileno( fopen( "./fcntl_test.c", "r" ) ); struct flock f; f.l_type = F_RDLCK; f.l_whence = SEEK_SET; f.l_start = 0; f.l_len = 0; return fcntl( fd, F_SETLK, &f ) != -1 ? EXIT_SUCCESS : EXIT_FAILURE; } EOF close $fh; if ( system "$Config{cc} -o fcntl_test fcntl_test.c" ) { unlink 'fcntl_test.c'; die "Failed to compile a program that uses fcntl(). Does your system " . "have a fcntl(2) system call?\n"; } unlink 'fcntl_test'; unlink 'fcntl_test.c'; # Finally create the Makefile WriteMakefile( NAME => 'File::FcntlLock', ( $] >= 5.005 ? ( VERSION_FROM => 'lib/File/FcntlLock.pm', ABSTRACT_FROM => 'lib/File/FcntlLock.pm', AUTHOR => 'Jens Thoms Toerring ' ) : ( ) ), PREREQ_PM => { POSIX => 0, Errno => 0, Carp => 0, Exporter => 0, DynaLoader => 0 }, PERL_MALLOC_OK => TRUE, C => [ 'FcntlLock.xs' ], test => { TESTS => 't/*.t' }, clean => { FILES => 'FcntlLock.h' } ); File-FcntlLock-0.14/README0000644000175000017500000000242111645136122013532 0ustar jensjensFile::FcntlLock version 0.13 ============================= FcntlLock is a module to do file locking in an object oriented fashion using the fcntl(2) system call. This allows locks on parts of a file as well as on the whole file and overcomes some known problems with flock(2), on which Perls flock() function is based pe default. PORTABILITY To use the module the system must supports the fcntl() system call which probably will restrict its use to POSIX compliant systems. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES The module requires the following other modules: POSIX, Errno, Carp, Exporter, DynaLoader To install the module a C compiler must be available and the system must support the use of shared libraries (or DLLs). ACKNOWLEDGMENTS Thanks to Mark Jason Dominus (MJD) and Benjamin Goldberg (GOLDBB) for helpful discussions, code examples and encouragement. Glenn Herteg pointed out several problems and also helped improve the documentation. AUTHOR Jens Thoms Toerring COPYRIGHT AND LICENCE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Copyright (C) 2002-20011 Jens Thoms Toerring File-FcntlLock-0.14/Changes0000644000175000017500000000512011652770613014153 0ustar jensjensRevision history for Perl extension File::FcntlLock 0.14 Thu Oct 29 2011 - Changed the test script to get it to pass under GNU Hurd, using only the rather limited fcntl() locking capabilities available on that system. Thanks to Julián Moreno Patiño for bringing the problem to my attention and helping me to set up a virtual GNU Hurd system for testing. 0.13 Thu Oct 11 2011 - Spelling errors fixed in the documentation, thanks to Julián Moreno Patiño (Debian Package Maintainer). 0.12 Thu Oct 8 2009 - Stupid bug in Makefile removed that assumed a certain layout of the flock structure - thanks to Glenn Herteg for spotting this. 0.11 Wed Oct 7 2009 - Module did use only 32-bit flock structure, making it impossible to obtain locks on parts of files above 4 GB. Now it also should work for large files. - Mistakes in documentation removed as pointed out by FANY and Glenn Herteg. 0.10 Wed May 14 2008 - Removed an issue in Makefile.PL that kept the module from being built on some systems 0.09 Sun Aug 26 2007 - Renamed module from Fcntl_Lock to FcntlLock to make it fit into the namespace newly allocated on CPAN 0.08 Sun Aug 12 2007 - Changes in error handling within the module - Makefile.PL changed so that it hopefully won't fail on (Net|Free|Open)BSD (and perhaps Cygwin) where locks on STDIN and STDOUT are not supported - Tests changed for the same reasons 0.07 Sun Aug 5 2007 - Module made ready for upload to CPAN - Changed name from Fcntl_Lock to File::Fcntl_Lock - Renamed some methods - Corrected some of the test cases - Updated documentation 0.06 Sun Apr 28 2002 - Error texts changed to reflect SUSv3 - Documentation updated 0.05 Mon Apr 22 2002 - Error texts changed to reflect TRUE64 man page - Internal module errors now call die instead of setting errno to EINVAL - Small bug fixes 0.04 Mon Apr 22 2002 - Added further test cases - Improved check on availability of fcntl(2) in Makefile.PL - Methods for simpler error determination - Update of documentation 0.03 Sat Apr 20 2002 - Removed a bug in Makefile.PL pointed out by "Frodo Baggins" - Added checks in Makefile.PL for compiler and 0.02 Sat Apr 20 2002 - Added tests in test.pl - Some changes in Makefile.PL thanks to Mark Jason Dominus - Module now recognizes file handles and descriptors correctly - Update of documentation 0.01 Thu Apr 18 2002 - original version; created by h2xs 1.21 with options -A -n Fcntl_Lock File-FcntlLock-0.14/META.yml0000644000175000017500000000117111652774016014134 0ustar jensjens--- #YAML:1.0 name: File-FcntlLock version: 0.14 abstract: File locking with L author: - Jens Thoms Toerring license: unknown distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 build_requires: ExtUtils::MakeMaker: 0 requires: Carp: 0 DynaLoader: 0 Errno: 0 Exporter: 0 POSIX: 0 no_index: directory: - t - inc generated_by: ExtUtils::MakeMaker version 6.55_02 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4