On Втр, 2002-02-26 at 18:31, Russell Coker wrote:
> On Tue, 26 Feb 2002 12:20, Aurelien Jarno wrote:
> > I am currently writing a small application using the serial port. To
> > respect standards, my application create a file in /var/lock, for example
> > /var/lock/LCK..ttyS0
> >
> > What is the standard when using devfs and devices in /dev/tts ?
> > /var/lock/LCK..tts0 ?
>
> Most code is using /var/lock/LCK..0, which will work OK as long as only
> serial ports are locked. We need something better though. Maybe
> /var/lock/...tts.0 (and as a general rule make it /var/lock/...ZZ where ZZ is
> the device name with /dev/ stripped off and all '/' characters replaced by
> '.' characters)?
>
SVR4 used (is using) device number to build lock file name which was
IMHO much better as it did not depend on any name and was immune to
symlinks.
So it would be something like LCK.4.64 be the name ttyS0, tts/0 or modem
as long as they point to the same device
-andrej
|