Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Mechanism for ensuring only one instance of a Perl script can only run?

by tybalt89 (Monsignor)
on Dec 06, 2022 at 22:32 UTC ( [id://11148625]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
      else { die "fork failed" }
      }
    1 while wait > 0; # wait until all children finish
    
  2. or download this
    79504 got lock
    79505 exiting Resource temporarily unavailable
    ...
    79515 got lock
    79516 exiting Resource temporarily unavailable
    79515 exiting
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148625]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-25 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found