poctob has asked for the wisdom of the Perl Monks concerning the following question:
However I am able to start multiple instances of this application without any errors or limitations. I was under impression that flock would prevent this app from running multiple instances. Can someone advise what I am doing wrong here? Thanks in advance#!/usr/bin/env perl use strict; use warnings; open(FH, "+< rotator_lock") or die "can't open: $!"; flock(FH, 2) or die "can't flock: $!"; # update file, then... sleep(120); close(FH) or die "can't close: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: flock on Ubuntu 9.10
by ikegami (Patriarch) on Nov 13, 2009 at 22:11 UTC | |
|
Re: flock on Ubuntu 9.10
by gmargo (Hermit) on Nov 13, 2009 at 22:14 UTC | |
by poctob (Initiate) on Nov 14, 2009 at 03:09 UTC | |
by ikegami (Patriarch) on Nov 14, 2009 at 07:14 UTC | |
|
Re: flock on Ubuntu 9.10
by trwww (Priest) on Nov 13, 2009 at 23:35 UTC | |
by ikegami (Patriarch) on Nov 13, 2009 at 23:57 UTC | |
by trwww (Priest) on Nov 16, 2009 at 02:51 UTC |