From owner-freebsd-i386@FreeBSD.ORG Mon Sep 27 13:20:24 2004 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DBC816A4CF for ; Mon, 27 Sep 2004 13:20:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F7B143D46 for ; Mon, 27 Sep 2004 13:20:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8RDKOxw041428 for ; Mon, 27 Sep 2004 13:20:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8RDKOJs041427; Mon, 27 Sep 2004 13:20:24 GMT (envelope-from gnats) Date: Mon, 27 Sep 2004 13:20:24 GMT Message-Id: <200409271320.i8RDKOJs041427@freefall.freebsd.org> To: freebsd-i386@FreeBSD.org From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Subject: Re: i386/71893 X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2004 13:20:24 -0000 The following reply was made to PR i386/71893; it has been noted by GNATS. From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: i386/71893 Date: Mon, 27 Sep 2004 15:14:17 +0200 isatty(3) is a library function, not a system call. Its return value is not a success / failure indication like that of system calls, but a yes / no answer. It is allowed, but not required, to set errno when it determines that the specified file descriptor does not correspond to a terminal device. In more general terms, you can not make any assumptions about the value of errno except immediately after a failed system call; its value is undefined in all other circumstances. System calls that do not fail leave it untouched, but library functions may or may not modify it, and its value may or may not reflect the actual error experienced by the library function. For more details on errno and isatty(3), refer to the Open Group Base Specification. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no