LWN.net Logo

A warning for BSD pseudo terminal users

H. Peter Anvin wants to know if anybody is still using the old BSD pseudo terminal ("pty") interface. These devices show up on most systems as /dev/ptyXX; they were once used for applications like network logins. Most applications on most Linux systems have not used BSD ptys for some years now; instead, the newer /dev/pts devices are used.

Peter is asking because he has plans for the pseudo terminal subsystem; he'd like to clean it up, make it more dynamic, and make use of the larger device numbers available in 2.6. The need to maintain compatibility with the BSD interface is, it seems, interfering with that work. So Peter would like to remove the BSD pty interface if possible.

There have been a few complaints. The bootlogd utility used by some distributions apparently uses BSD terminals in some cases. Truly old systems may still use the old interface for network logins or terminal emulator windows; this is not functionality that one breaks lightly. Peter may yet find a way to maintain BSD pty support while making his other changes. Even so, the BSD pty interface may be headed toward the end of its life sometime in the 2.7 development series.


(Log in to post comments)

Maybe it should become optional in 2.6.x series

Posted Feb 12, 2004 3:04 UTC (Thu) by proski (subscriber, #104) [Link]

I think it should become optional in 2.6.x kernels, so that users could compile a kernel without BSD ptys and see if anything breaks. Embedded systems that use UNIX98 ptys would gladly welcome one more option to turn off.

A warning for BSD pseudo terminal users

Posted Feb 12, 2004 14:45 UTC (Thu) by elanthis (subscriber, #6227) [Link]

"truly ancient systems" wouldn't be running a 2.6/2.8 kernel, now, would they? that's the dumbest argument I can think of to keep the interface. ~,^

A warning for BSD pseudo terminal users

Posted Feb 12, 2004 15:00 UTC (Thu) by iabervon (subscriber, #722) [Link]

Late in that thread, he said that supporting BSD ptys was going to turn
out to be easy once everything had been cleaned up. Someone also
suggested having the kernel warn about programs using BSD ptys, so that
people would know if they still had programs which used them.

What about expect?

Posted Feb 12, 2004 15:40 UTC (Thu) by spudbeach (guest, #5837) [Link]

I'm not much of a kernel hacker, but I do a lot of remote system work, and for that, there is no better scripting language than "expect", by Don Libes. It uses pty's extensively, for such things as opening up a dialog with a process and such. As long as expect works, I really don't care what the kernel does, but if it breaks expect, I won't use a new kernel.

Steve Beach

What about expect?

Posted Feb 13, 2004 2:43 UTC (Fri) by set (guest, #4788) [Link]

Well, we have the source to expect, so if it didnt know about how to
get pty any other way than to use the BSD style interface, then it
could be easily fixed. But expect looks to have support for several
different operating systems and how to get a pty on them, including
using the Unix98 pty scheme. (man ptmx) So, you should be fine;)

Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds