Re: append data / locks
- From: Mike <maaz@xxxxxxx>
- Date: Tue, 12 Jun 2007 14:57:37 -0000
On Jun 12, 6:28 am, slin...@xxxxxxxxx wrote:
Hello,
I have several scripts that are using the redirection operator >> to
append data to a masterfile.
I now want to ensure that the masterfile is only opened by one script
at a time.
I assume I can solve this somehow by locks - but then I would need to
check if the file is not already open and set a lock at the same time.
Is there a way to do this?
or any other ideas?
Thanks,
Sven
Check out this link, it provides a couple of unsafe (i.e. potential
race conditions) solutions and a more complex solution which the
author believes is safe.
http://www.unixreview.com/documents/s=9040/ur0402g/
.
- References:
- append data / locks
- From: slinges
- append data / locks
- Prev by Date: Re: NF,$NF
- Next by Date: Graphical scripts
- Previous by thread: append data / locks
- Next by thread: Re: append data / locks
- Index(es):
Relevant Pages
|