Name
IPC::SRLock::Fcntl - Set / reset locks using fcntl
Synopsis
use IPC::SRLock;
my $config = { tempdir => q(path_to_tmp_directory), type => q(fcntl) };
my $lock_obj = IPC::SRLock->new( $config );
Description
Uses Fcntl to lock access to a disk based file which is read/written in Storable format. This is the default type for IPC::SRLock.
Configuration and Environment
This class defines accessors for these attributes:
lockfile
-
Path to the file used by fcntl
mode
-
File mode to use when creating the lock table file. Defaults to 0666
pattern
-
Regexp used to untaint file names
shmfile
-
Path to the lock table file
tempdir
-
Path to the directory where the lock files reside. Defaults to
File::Spec->tmpdir
umask
-
The umask to set when creating the lock table file. Defaults to 0
Subroutines/Methods
BUILDARGS
Extract the "tempdir" attribute value from the config
object if one was supplied
list
List the contents of the lock table
_read_shmfile
Read the file containing the lock table from disk
reset
Delete a lock from the lock table
set
Set a lock in the lock table
_write_shmfile
Write the lock table to the disk file
Diagnostics
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Author
Peter Flanigan, <pjfl@cpan.org>
License and Copyright
Copyright (c) 2017 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE