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

tytso@mit.edu
Tue, 9 Jun 1998 13:27:33 -0400


Date: Tue, 9 Jun 1998 10:36:38 +1000
From: Richard Gooch <Richard.Gooch@atnf.CSIRO.AU>

Well, I've seen one comment already questioning whether major/minor
device locks are the better way of doing it, instead of flock(2).

flock(2) simply doesn't work because you may need to keep a tty locked
beyond the lifetime of the process which originally locked the tty.

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?

tty locking really doesn't belong in the kernel. It's a lot more
complex than limiting the number of open's to 1. You need to worry
about people who have a blocking open waiting for carrier detect going
high; you need to worry with multiple processes opening /dev/tty when
someone is logged into a dialup modem. You need to worry about people
running xmodem in a separate process from kermit, etc., etc.

- Ted

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