[lkml]   [1998]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: >256 ptys (previous subject line was garbage)
   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

 \ /
  Last update: 2005-03-22 13:43    [W:0.047 / U:0.032 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site