From owner-freebsd-arch Wed Jul 26 17:50:13 2000 Delivered-To: freebsd-arch@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id 1D51437BC5A for ; Wed, 26 Jul 2000 17:50:03 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: (qmail 26676 invoked from network); 27 Jul 2000 00:49:58 -0000 Received: from unknown (HELO bde.zeta.org.au) (203.2.228.102) by gidora.zeta.org.au with SMTP; 27 Jul 2000 00:49:58 -0000 Date: Thu, 27 Jul 2000 10:49:55 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Brian Dean Cc: freebsd-arch@FreeBSD.ORG Subject: Re: isatty() reports false results In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 25 Jul 2000, Brian Dean wrote: > My question - does anyone know if this logic will break anything else, > i.e., a case where a call to 'tcgetattr()' with a descriptor that > *does not* refer to a tty will return EAGAIN? I haven't seen anything Probably not. POSIX.1 says that tcgetattr() shall return EBADF for non- open files and ENOTTY for non-terminals. These are the only errors mentioned in POSIX.1. Returning EAGAIN is probably a bug. OTOH, checking for only EAGAIN is a bug if there are any other undocumented error returns. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message