LOCKG(3) Linux Programmer’s Manual LOCKG(3) NAME
Short Description
LOCKG(3) Linux Programmer’s Manual LOCKG(3). NAME. lockg - apply, test or remove a POSIX group lock on an open file. SYNOPSIS. #include …
Website: www.opengroup.org | Filesize: 20kb
Content
LOCKG(3) Linux Programmer’s Manual LOCKG(3)
NAME
lockg - apply, test or remove a POSIX group lock on an open file
SYNOPSIS
#include
int lockg(int fd, int cmd, lgid_t *lgid);
DESCRIPTION
Apply, test, remove, or join a POSIX group lock on an open file. Group
locks are exclusive, whole-file locks that limit file access to a
specified group of processes. The file is specified by fd, a file
descriptor open for writing and the action by cmd.
The first process to call lockg() passes a cmd of F_LOCK and an
initialized value for lgid. Obtaining the lock is performed exactly as
though a lockf() with pos of 0 and len of 0 were used (i.e. defining a
lock section that encompasses a region from byte position zero to
present and future end-of-tile positions). An opaque lock group id is
returned in lgid. This lgid may be passed through external means (e.g.
message passing or shared memory communication) to other processes for
the purpose of allowing them to join the group lock.
Processes wishing to join the group lock call lockg() with a cmd of…
Get the file Download here
Related Books:Related Searches: linux programmer, file group, posix, group id, short description
Comments
Leave a Reply