#: 20692 S12/OS9/68000 (OSK)
08-Jan-95 16:56:04
Sb: #20688-#unix functions
Fm: Bud Hamblen 72466,256
To: LARRY OLSON 72227,3467 (X)
Bob,
Here's what "man flock" produced on my LINUX box:
FLOCK(2) Linux Programmer's Manual FLOCK(2)
NAME
flock - apply or remove an advisory lock on an open file
SYNOPSIS
#include
int flock(int fd, int operation)
DESCRIPTION
Apply or remove an advisory lock on an open file. The
file is specified by fd. Valid operations are given
below:
LOCK_SH Shared lock. More than one process may
hold a shared lock for a given file at a
given time.
LOCK_EX Exclusive lock. Only one process may
hold an exclusive lock for a given file
at a given time.
LOCK_UN Unlock.
LOCK_NB Don't block when locking. May be speci-
fied (by or'ing) along with one of the
other operations.
A single file may not simultaneously have both shared and
exclusive locks.
A file is locked (i.e., the inode), not the file descrip-
tor. So, dup(2) and fork(2) do not create multiple
instances of a lock.
RETURN VALUE
On success, zero is returned. On error, -1 is returned,
and errno is set appropriately.
ERRORS
EWOULDBLOCK
The file is locked and the LOCK_NB flag was
selected.
NOTES
Under Linux, flock is implemented as a call to fcntl.
Please see fcntl(2) for more details on errors.
SEE ALSO
open(2), close(2), dup(2), execve(2), fcntl(2), fork(2),
Linux 0.99.11 22 July 19
I guess _ss_lock() for Mircoware C 3.2 or _os_ss_lock() for Ultra C would be
the nearest OS-9/68000 equivalnets.
"Man lockf" produced nothing.
Bud
There is 1 Reply.
|