Re: Proposal for redesigning the TTY layer




Much of this looks very sensible, but I have a few red flags:

The current PTY implementation (both /dev/pty*
and /dev/pts/*) suffers from the problem that a
simple stat() on a nonexistent device will already
create the device, even if the user has no intention
to use it.

Last I worked on this, there were several applications in ports
that broke if this didn't work that way. You would have to be
prepared to hunt down every single bogo_openpty() function in ports
if you carry this change through.

Move prison checks into devfs

They do not belong in DEVFS, since that would require DEVFS to know
far more about the device semantics if the individual drivers than
it ever should.

You can put it in the generic tty layer if you want, that would be
emminently sensible, but DEVFS is the wrong place for it.

Clists

I would just drop clists and switch to mbufs.

Consoles...

Consoles are not ttys and ttys are not consoles. They may share
hardware, but that does not make them the same thing. I have
analyzed the console situation in detail on the arch@ mailing list
long time ago, and you should read that analysis before you touch
the console code.

Items missing from your list:

Firmly abstract line discipline from tty code

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@xxxxxxxxxxx | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Characters too small in tty
    ... new reboot characters in tty* consoles were smaller, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Proposal for redesigning the TTY layer
    ... They do not belong in DEVFS, since that would require DEVFS to know ... You can put it in the generic tty layer if you want, ... the console code. ... I was already planning to add the termios line discipline code outside ...
    (freebsd-arch)
  • Re: ttydev_cdevsw has no d_purge
    ... This shall result in all threads blocking on a TTY to be woken up. ... it will prevent any further calls into the USB code by the TTY ... around in devfs, even though the device underneath went missing. ... kernel USB device structures can be separated at any time. ...
    (freebsd-current)
  • Re: "Status" screen without logging into PC?
    ... You could make one of the consoles to run top instead of tty, modify your ... inittab. ...
    (alt.os.linux)