[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Proposal for write(1) addition
On Sun, Sep 18, 2011 at 02:52:28PM -0400, Mouse wrote:
> >>> [...ptys...ptyfs...]
> >> The major one is compatability.
> > We had the ifdef hell before POSIX ptys were invented. Now at least
> > it is standardized.
> So, unless you don't care about running on the existing installed base,
> you have the same ifdef hell, exacerbated by one more option.
Practically speaking, that's exactly what is happening. Most things
dealing with terminal emulation are just keeping enough of the old
compat junk around to keep OpenBSD happy. Some go as far as providing
the POSIX API with a fallback implementation of it for legacy code.
There are a lot of reasons for wanting to use the POSIX API. The biggest
one is that it scales in the number of ptys. It just works, even if you
have more than 64 xterms open.
> The node? By that, I've been assuming you're talking about the device
> special file in the filesystem. That's exactly what I was talking
> about: my "expose" was really "expose as something open()able".
> Obviously you have some kind of handle on the master half, or ptys
> could hardly work at all.
/dev/tty is a cloning device. You open it and get a new pty master.
Not being able to reopen the master is design choice -- it avoids all
the nasty race conditions that let to the creation of revoke.
Main Index |
Thread Index |