Re: dynamic pty allocation.

Tim Wright (timw@aracnet.com)
Sat, 21 Mar 1998 17:27:06 -0800


> On Sat, 21 Mar 1998 Greg Alexander <galexand@sietch.bloomington.in.us> wrote:
>
> > 'sides, I bothered to write this and I'll be damned if I'm gonna use
> > some halfway backwards compatable solution just because it's standard. We
> > both know this standard isn't entrenched enough to be worth much more than
> > each sysad setting up his own scheme, which is what it has amounted to up
> > until now.
>
> I hardly think Solaris 'isn't entrenched enough to be worth much'.
> xterm, for example, has had code to support Unix98/Solaris-style pty
> allocation since at least 1995. I suspect the vast majority of portable
> applications to be similar.
> --Scott
> @ @

Indeed. The "/dev/ptmx", allocpt(), unlockpt(), grantpt() stuff appeared in
SVR4.

*Every* SVR4-derived Unix, and others which have aligned with SVR4 supports
this. Scott mentions Solaris. ICLs DRS/NX, SCO Unixware, Sequents Dynix/ptx,
and the SVR4 derivative that NCR ship all use this method to allocate ptys.
Far from it being 'not entrenched enough to be worth it', it is by far and
away the most common method of pty allocation. That is almost certainly why
it was chosen for the Unix'98 standard.

Anybody considering doing things differently had better have *extremely*
good reasons for making every developers life that much more difficult by
introducing yet another way of doing something when there is already a
perfectly adequate method in existence.

As Scott says, a much more important job is to make the actual device
allocation in the kernel dynamic, and to get on with making kdev_t large
enough to avoid having to play games when supporting >256 "units" for a
given device major==driver.

t

-- 
Tim Wright                        | Aracnet -- Portland's loudest electrons
timw@aracnet.com OR               | Ring +1 503 626.6873 V.34 (28800) 24hrs
timw@sequent.com                  | Browse http://www.aracnet.com for info!
"Nobody ever said I was charming, they said "Rimmer, you're a git!"" RD VI

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