🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.apple2.gno
Article #143

Is console a tty ? (was Re: segment sizes)

#143
From: Stefan Voss
Date: Thu, 05 Nov 1992 14:21
27 lines
1407 bytes
Hi C experts,

thanx for the advice of converting '#pragma segement "foo"' to
'segment "foo       ";'. Works great. Now the program I am trying to
port to the GS (XLISP 2.0d) compiles and links with no errors.

But, one error vanished and another has arised.
The code that deals with the operating system (originally Unix, now GNO)
uses a lot of IOCTL-stuff. Especially, there is a line

if (gtty(0, &savetty) == -1) { ... }; \* savetty being a struct sgttyb *\

with gtty as usual defined as : 
#define gtty(fd, arg)    (ioctl(fd, TIOCGETP, arg))

The call to gtty returns -1 (i.e. an error) with the variable 
errno set to 20 (ENOTTY).
Conclusion: The current controlling terminal (GNO Console driver) isn't
a tty (whatever that is).

Can I make the GNO Console driver a tty ? (Perhaps, setting a variable ?)
Or do I have to modify/throw out the source code ?

Hope, somebody can help.

     Stefan Voss       (voss@ira.uka.de)
 
Technical Details
Message-ID: <1dbal6INNlkt@iraul1.ira.uka.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sdd.hp.com!caen!sol.ctr.columbia.edu!ira.uka.de!uka!i40s16!voss

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sdd.hp.com!caen!sol.ctr.columbia.edu!ira.uka.de!uka!i40s16!voss
From: voss@i40s16.ira.uka.de (Stefan Voss)
Newsgroups: comp.sys.apple2.gno
Subject: Is console a tty ? (was Re: segment sizes)
Date: 5 Nov 1992 14:21:26 GMT
Organization: University of Karlsruhe, FRG
Lines: 30
Distribution: world
Message-ID: <1dbal6INNlkt@iraul1.ira.uka.de>
NNTP-Posting-Host: i40s16.ira.uka.de
Keywords: gno, ioctl, tty