summaryrefslogtreecommitdiffstats
path: root/lib/libutil
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1997-04-01 17:44:31 +0000
committermpp <mpp@FreeBSD.org>1997-04-01 17:44:31 +0000
commit6fb13de4c35c88bd7dfe7f0bbb57b9be38a78d08 (patch)
tree910914489bfc04646ac7e38cba6691a243e0bf3e /lib/libutil
parent7f21d44360e215e7dddb821946dcca7b8e6a4431 (diff)
downloadFreeBSD-src-6fb13de4c35c88bd7dfe7f0bbb57b9be38a78d08.zip
FreeBSD-src-6fb13de4c35c88bd7dfe7f0bbb57b9be38a78d08.tar.gz
Mdoc police.
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/uucplock.319
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/libutil/uucplock.3 b/lib/libutil/uucplock.3
index 0c1ae7e..1841df3 100644
--- a/lib/libutil/uucplock.3
+++ b/lib/libutil/uucplock.3
@@ -23,14 +23,15 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $Id: uucplock.3,v 1.1 1997/03/30 12:11:29 brian Exp $
+.\" $Id: uucplock.3,v 1.2 1997/03/31 22:47:53 brian Exp $
.\" "
.Dd March 30, 1997
.Os
.Dt uucplock 3
.Sh NAME
.Nm uu_lock ,
-.Nm uu_unlock
+.Nm uu_unlock ,
+.Nm uu_lockerr
.Nd acquire and release control of a serial device
.Sh SYNOPSIS
.Fd #include <libutil.h>
@@ -50,7 +51,7 @@ command line.
The
.Fn uu_lock
function attempts to create a lock file called
-.Dq /var/spool/lock/LCK..
+.Pa /var/spool/lock/LCK..
with a suffix given by the passed
.Fa ttyname .
If the file already exists, it is expected to contain the process
@@ -120,9 +121,9 @@ is passed, an empty string is returned. Otherwise, a string specifying
the reason for failure is returned.
.Fn uu_lockerr
uses the current value of
-.Dv errno
+.Va errno
to determine the exact error. Care should be made not to allow
-.Dv errno
+.Va errno
to be changed between calls to
.Fn uu_lock
and
@@ -131,13 +132,13 @@ and
If
.Fn uu_lock
returns one of the four error values above, the global value
-.Dv errno
+.Va errno
can be used to determine the cause. Refer to the respective manual pages
for further details.
.Pp
.Fn uu_unlock
will set the global variable
-.Dv errno
+.Va errno
to reflect the reason that the lock file could not be removed.
Refer to the description of
.Xr unlink 2
@@ -158,14 +159,14 @@ process. If this happens,
returns
.Dv UU_LOCK_READ_ERR
and errno is set to
-.Dv EINVAL .
+.Er EINVAL .
.Pp
It is possible that a stale lock is not recognised as such if a new
processes is assigned the same processes id as the program that left
the stale lock.
.Pp
The calling process must have write permissions to the
-.Dq /var/spool/lock
+.Pa /var/spool/lock
directory. There is no mechanism in place to ensure that the
permissions of this directory are the same as those of the
serial devices that might be locked.
OpenPOWER on IntegriCloud