1

Possible Duplicate:
What Unix commands can be used as a semaphore/lock?

I have read many similar post and the solution seems to be to use flock. flock does not exist on my system and I don't have rights to add it.

References:

  1. A "BashFAQ" link provided in a comment in how-to-make-sure-only-one-instance-of-a-bash-script-runs talks about using flock
Kent Pawar
  • 1,256
  • 4
  • 16
  • 37
  • [How about Perl?](http://www.perlmonks.org/?node_id=7058) Besides, [the *lock directory* solution](http://unix.stackexchange.com/a/48510/11539) is available. – sr_ Jan 18 '13 at 15:00
  • @sr_ Yes I do have Perl! For portability I am hoping to avoid dependency on external programs.. – Kent Pawar Jan 18 '13 at 15:09
  • Anyway, I'm rather confused about your question, since *none* of the answers in the referenced question uses `flock`... – sr_ Jan 18 '13 at 15:13
  • @sr_ Sorry about that.. flock was mentioned in a comment. – Kent Pawar Jan 18 '13 at 15:19
  • 1
    @sr_ and others: note that this question specifically asks about NFS. Many NFS implementations have race conditions that break many locking techniques. Solaris's NFS implementation is better than most, but please do not close this question as a duplicate of one that doesn't focus on NFS. Kent: are all the clients and the server running Solaris? – Gilles 'SO- stop being evil' Jan 18 '13 at 23:11

1 Answers1

-3

Is simple a lock file, created with touch or echo, too weak for you system?

Arcadien
  • 1,575
  • 1
  • 9
  • 6