1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
.\" wlock - Tests or sets a file with POSIX-fcntl() write-locks
.\" Copyright (c) 1998 Martin Schulze <joey@debian.org>
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.\"
.TH WLOCK 1 "19 March 1998" "" "System Administration"
.SH NAME
wlock \- Tests or sets a file with POSIX-fcntl() write-locks
.SH SYNOPSIS
.B wlock
.RB [ " \-s " [ "\-a \fIseconds\fR " ]]
.RB [ " \-t" ]
.RB [ " \-v" ]
.RB [ " \-b \fIbegin\fR " ]
.RB [ " \-l \fIlength\fR " ]
.I file
.br
or
.br
.B wlock
.RB [ " \-s " ]
.RB [ " \-v" ]
.RB [ " \-b \fIbegin\fR " ]
.RB [ " \-l \fIlength\fR " ]
.IR "file program " "[ " arguments " ]"
.SH DESCRIPTION
.B
This program sets or tests advisory locks conforming to POSIX fcntl()
call. You may specify optionaly a program to start it within the lock
context.
.SH OPTIONS
These options are accepted. If a program is provided as argument
.B wlock
will start it.
.TP
.B "\-s"
Sets the lock.
.TP
.B "\-t"
Test the lock (default).
.TP
.B "\-v"
Verbose output.
.TP
.BI "\-b " begin
The lock starts at byte
.RI # begin .
.TP
.BI "\-l " length
The lock will be
.I length
bytes long.
.TP
.BI "\-a " seconds
The lock is active for
.I seconds
(default=86400).
.PP
.SH "RETURN VALUES"
.TP
.B 0
In test mode this means that the file is locked. In set mode it
indicates the succesful creation of the lockfile
.TP
.B 1
The file is not locked. Only available in testmode.
.TP
.B 2
Some error has occurred.
.SH AUTHOR
.B wlock
has been written by Ulli Horlacher (framstag@belwue.de>.
.SH "SEE ALSO"
.BR sendfile (1).
|