Subject: Re: uugetty for NetBSD
To: Curt Sampson <>
From: Erik E. Fair <>
List: current-users
Date: 11/19/1996 01:44:45
You might find the "shlock" program in the original NNTP distribution (last
version was 1.5) useful in this context - it was a simple program that I
wrote years ago that uses HDB UUCP style lockfiles for arbitrary files and
PIDs, so that shell scripts (and the like) can have reliable, portable
locks. I never had to use it in an NFS environment, so it does not do the
dance with hostnames.

I will happily contribute it to NetBSD, if there's interest. One thing: it
depends upon being able to send signal 0 (null signal), and getting back
EPERM (permission denied - process exists, but it's not yours), ESRCH (no
such process), or success (of course, on a null signal, nothing happens).
HDB UUCP depends on this mechanism to validate locks, too.