Re: >256 ptys (previous subject line was garbage)

Richard Gooch (Richard.Gooch@atnf.CSIRO.AU)
Tue, 9 Jun 1998 10:36:38 +1000


tytso@mit.edu writes:
> Date: Fri, 5 Jun 1998 12:59:59 +0200 (MET DST)
> From: Peter Svensson <petersv@df.lth.se>
>
> I am not familiar with the reasons for using major/minor-pair for
> locking so I don't know if another solution is feasable. Do you have
> any pointers for additional reading? :-)
>
> The problem is things like /dev/modem being a symlink (or perhaps even a
> hard link) to /dev/ttyS0. So it would be useful to use a lockfile that
> includes the major and minor device number, in addition to using a
> lockfile that is based on the device name. The basic idea is that
> people want to have different device names to refer to the same device,
> so we need to lock based the major/minor devices.

Well, I've seen one comment already questioning whether major/minor
device locks are the better way of doing it, instead of flock(2).
However, ignoring that, I think it would be simple enough to implement
a non tty-specific locking scheme in devfs. I already have the auto
ownership facility.
What does this device locking need? Just limit the number of open(2)s
to 1?

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu