Re: HDB style locks (was "kermit")
Daniel Quinlan writes:
>
> >>> FSSTND decided against the SCO and SVR4 implementations for various
> >>> reasons.
>
> (Didn't I explain this before?)
>
> a) There are proposed plans to change the device numbering scheme in
> Linux eventually (that might conceivably affect this).
No, it wouldn't. Linux will always use major/minor numbers to specify
devices; the only changes might come in which devices are associated with
which numbers and how many bits can be stored for each number.
> b) Some devices share the same device, but have different major
> numbers (i.e., /dev/cua0 and /dev/ttyS0).
Well, HDB doesn't fix this either, but it is a valid point: as the
benefit of the SVR4 scheme is to help prevent lost locks due to device
"aliasing", cases where it doesn't do its job show a strong argument
against it. Also, since Debian and FSSTND have declared that symlinks
do not belong in /dev, there really isn't much the SVR4 scheme can help
with.
Oh, well. A perfect solution would be a set of C library functions
lock_device() and unlock_device(), the first returning a status code
and optionally waiting until the device comes free. That way, it
wouldn't matter if /var/lock/LCK..whatever files or SYSV semaphores
were used. But it's too late to go back...
Reply to: