Subject: Re: uugetty for NetBSD
To: None <perry@piermont.com>
From: Simon J. Gerraty <sjg@quick.com.au>
List: tech-kern
Date: 11/13/1996 18:49:50
Perry E. Metzger writes:

>> Oh, and the other reason? Most every program in the world that uses
>> serial ports uses LCK..ttyXX locking.

>Yeah, but there are reasons why its not the best idea on
>earth. Security problems associated with needing the sgid UUCP
>stuff. Lack of automatic cleanup when processes die (this is a real
>problem -- every try explaining to someone over the phone how to
>remove a stale lock file?). etc, etc.

This is part of the argument for a central uucplock routine,
a proper implementation simply removes stale locks and re-tries
the lock protocol.

Lock files may not be sexy etc, but they are effective and allow me for
instance to provide a simple shell wrapper for $EDITOR which allows
host masters to edit zone files, safe in the knowledge that none
of the automagic jobs written in C, perl, sh will mess with them
while locked.

If you rely on a locking method that can only be implemented in C and 
automagically cleans up when the process exits, the above is
_much_ harder to achieve.

Lock files may not be sexy, but I've never had to reboot a machine
to clear one. :-)

--sjg
-- 
Simon J. Gerraty        <sjg@quick.com.au>

#include <disclaimer>   /* imagine something _very_ witty here */