🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.d
Article #5077

Re: atty on Sun 3 (SunOS 3.5 yes SunOS 4.0 no)

#5077
From: Guy Harris
Date: Tue, 06 Jun 1989 17:51
36 lines
2039 bytes
>  We have successfully run it on SunOS 3.5 machine but NOT SunOS 4.0.
>  It appears to make copious use of now obsoleted ioctl's. 

Excuse me?  To which "ioctl"s are you referring?  The "ioctl"s it uses
are:

	TIOCREMOTE, TIOCPKT - all documented in the 4.0 PTY(4)

	TIOCNOTTY - documented in the 4.0 TTY(4) (documentation for
	   "/dev/tty")

	TIOCGPGRP, TIOCSPGRP, TIOCGWINSZ, TIOCSWINSZ - documented in
	   the 4.0 TERMIO(4) (and, for the latter two, in PTY(4)

	TIOCFLUSH, TIOCGETP, TIOCGETC, TIOCLGET, TIOCGLTC, TIOCSETP,
	    TIOCSETC, TIOCLSET, TIOCSLTC - documented in the 4.0
	    TTCOMPAT(4M)

	TIOCGETD, TIOCSETD - the only ones not documented, although they
	    still do work to a *limited* degree (there are no "line
	    disciplines" *per se* in 4.0, just streams modules; however,
	    for a small set of "line discipline" numbers, it attempts to
	    shuffle streams modules around to make those "ioctl"s work,
	    for binary compatibility)

The "ioctl"s documented in TTCOMPAT(4M) are *not* considered "obsolete"
in the sense of "unsupported".  If you're writing a program to run on
4.xBSD-flavored systems, they're the right ones to use (at least until
Berkeley drops them, if they in fact do so when going to a POSIX-style
tty driver).

The problem is solely that "atty" was depending on an undocumented quirk
of the BSD pseudo-tty driver implementation, namely that all "ioctl"s
that work on the slave side of a pseudo-tty work on the master side as
well.  Fixes have been posted.  Please, no more third-hand speculation
on what the problem is.
Technical Details
Message-ID: <1758@auspex.auspex.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!auspex!guy
References: <283@kurz-ai.UUCP> <5511@ditmela.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!auspex!guy
From: guy@auspex.auspex.com (Guy Harris)
Newsgroups: comp.sources.d
Subject: Re: atty on Sun 3 (SunOS 3.5 yes SunOS 4.0 no)
Message-ID: <1758@auspex.auspex.com>
Date: 6 Jun 89 17:51:40 GMT
References: <283@kurz-ai.UUCP> <5511@ditmela.oz>
Reply-To: guy@auspex.auspex.com (Guy Harris)
Organization: Auspex Systems, Santa Clara
Lines: 36