GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PID::FILE::FLOCK (3)

.ds Aq ’

NAME

Pid::File::Flock - PID file operations

CONTENTS

VERSION

Version 0.08

SYNOPSIS

You can use module generic way:



  use Pid::File::Flock;
  ...
  Pid::File::Flock->new;
  Pid::File::Flock->new(file);
  Pid::File::Flock->new(debug=>1, dir=>/tmp);



or in simplified form:



  use Pid::File::Flock qw(:auto);
  use Pid::File::Flock qw(:auto :raise);
  use Pid::File::Flock qw(:auto path=file);
  use Pid::File::Flock qw(:auto :debug dir=/tmp);



you can mix both too:



  use Pid::File::Flock qw(:debug dir=/tmp);
  ...
  Pid::File::Flock->new(ext=>.old);



IMPORT LIST

You can provide ’flag’ options (’debug’,’quiet’) like an import tag: use Pid::File::Flock qw(:debug :quiet)

Valued options can be specified with key=value form: use Pid::File::Flock qw(dir=/tmp ext=.old)

Pseudo tag ’:auto’ create lock object implicitly.

GENERIC USAGE

new( CW$path, CW%options )

Generic constructor
$path Optional argument, if provided options ’dir’,’name’ and ’ext’ will be silently ignored.
Supported options:
o dir => ’directory’

Base directory for pid file (by default File::Spec::tmpdir called).

o name => ’basename’

Name for pid file (by default like a script self).

o ext => ’extension’

Extension for pid file (’.pid’ by default).

o raise => 1

Use croak instead of simple exit. Usable from caller eval block to handle unsuccessful locking attempts.

o debug => 1

Switch debug mode on (some information via STDERR).

o quiet => 1

Switch quiet mode on (don’t warn about staled pid files).

    abandon

Don’t try to remove pid file during destruction. Become for using in forking applications.

INTERNAL ROUTINES

You haven’t call these methods directly.

    import

Process ’fake’ import list.

    acquire

Acquiring lock, called by new constructor.

    attempt

Attempting acquire lock with additional checks.

    release

Unlink pid file, handle will be closed a bit later, during object destructing.

    DESTROY

Lock object destructor.

    END

Undefine module lexical variable to force DESTROY invoking.

AUTHOR

Oleg A. Mamontov, <oleg at mamontov.net>

LIMITATIONS

Module works with advisory files locking which is not implemented on win32 platform.

BUGS

Please report any bugs or feature requests to bug-pid-file-flock at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Pid-File-Flock>. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.



    perldoc Pid::File::Flock



You can also look for information at:
o RT: CPAN’s request tracker

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Pid-File-Flock>

o AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/Pid-File-Flock>

o CPAN Ratings

<http://cpanratings.perl.org/d/Pid-File-Flock>

o Search CPAN

<http://search.cpan.org/dist/Pid-File-Flock/>

COPYRIGHT & LICENSE

Copyright 2009 Oleg A. Mamontov, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PID::FILE::FLOCK (3) 2010-11-19

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.