From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Wed, 13 Apr 2005 17:50:42 -0400 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Common code - isatty In-Reply-To: <20050413132042.GA13385@melkki.cs.Helsinki.FI> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050413132042.GA13385@melkki.cs.Helsinki.FI> Topicbox-Message-UUID: 37b5423e-ead0-11e9-9d60-3106f5b1d025 the correct approach is to check whether the end of fd2path is /dev/cons. the qid check is an older approach that was used before fd2path. i'm hesitant to put it in a library because most programs (e.g., ls) should not behave differently when running on a console. if it's there, it may be overused like in unix. but i'd gladly apply a patch fixing telnet, rc, upas, and libstdio. russ