in reply to Storable and passed filehandles
The flock is only advisory - it is not guarranteed.
The best way to coordinate your programs on the same server is to use a proper interprocess locker, such as IPC::Semaphore (I assume that you are working on Unix systems), create a public lock, and have all the processes that want to read the file to obtain that lock before accessing the file.
If the file you are trying to access is on the network, then use a network locking mechanism, such as, say, IPC::Locker.
The best way to coordinate your programs on the same server is to use a proper interprocess locker, such as IPC::Semaphore (I assume that you are working on Unix systems), create a public lock, and have all the processes that want to read the file to obtain that lock before accessing the file.
If the file you are trying to access is on the network, then use a network locking mechanism, such as, say, IPC::Locker.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Storable and passed filehandles
by blahblah (Friar) on Aug 15, 2005 at 21:19 UTC | |
by Roger (Parson) on Aug 15, 2005 at 23:26 UTC | |
by blahblah (Friar) on Aug 15, 2005 at 23:33 UTC | |
by tye (Sage) on Aug 15, 2005 at 23:27 UTC | |
by blahblah (Friar) on Aug 15, 2005 at 23:30 UTC | |
by tye (Sage) on Aug 16, 2005 at 00:40 UTC | |
by blahblah (Friar) on Aug 16, 2005 at 01:21 UTC | |
|
In Section
Seekers of Perl Wisdom