The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

IPC::Lockfile - run only one instance of a program at a time using flock

VERSION

version 0.01

SYNOPSIS

Just import the module:

    #!/usr/bin/env perl
    use IPC::Lockfile;

    ... # program code here

No external lockfile is created, IPC::Lockfile uses _DATA_ (See #THANKS).

DESCRIPTION

IPC::Lockfile is a module for use with Perl programs when you only want one instance of the script to run at a time. It uses flock and should work if run on an OS that supports flock (e.g. Linux, BSD, OSX and Windows).

THANKS

This module implements an elegant solution to lockfiles proposed by Mark Jason Dominus.

SEE ALSO

IPC::Pidfile for a PID-based solution that relies on signals and has a race condition (not recommended).

AUTHOR

David Farrell <dfarrell@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by David Farrell.

This is free software, licensed under:

  The (two-clause) FreeBSD License