flock
Section: User Commands (1)
Index
Return to Main Contents
Name
flock, funlock - Provide single user access to a file(s)
Syntax
flock files ...
funlock files ...
Description
For processes using this pair of routines, flock/funlock provide
a way of serialising access to a file. Flock tries to create a
file with a name derived from the target, and waits until it
is successful. Funlock removes this "lock" file, allowing waiting
"flock"s to continue.
Arguments
files - a list of files to be locked. These are processed in order, so
there is no deadlock problem.
Example
$ flock libcitr.a
$ ar libcitr.a xxxx.o
$ funlock libcitr.a
See Also
creat(1)
Environment
PATH=$PATH:/home/joppa/fastpac/bin/{HPPA,RISC}
MANPATH=$MANPATH:/home/joppa/fastpac/release_2/doc/60.Manuals
Known Bugs
If a makefile using flock is interrupted, the lock file remains, and
thus must be manually released.
Write access is required to the directory where the target file is.
Author
David Horton - CiTR
Copyright
Centre for Information Technology Research, 1993
Index
- Name
-
- Syntax
-
- Description
-
- Arguments
-
- Example
-
- See Also
-
- Environment
-
- Known Bugs
-
- Author
-
- Copyright
-
This document was created by
man2html,
using the manual pages.
Time: 23:34:46 GMT, September 27, 2019