From owner-freebsd-arch@FreeBSD.ORG Tue Apr 8 12:49:48 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 238EE37B401; Tue, 8 Apr 2003 12:49:48 -0700 (PDT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id A828A43FBD; Tue, 8 Apr 2003 12:49:46 -0700 (PDT) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.9/8.12.9) with ESMTP id h38Jni0q043958; Tue, 8 Apr 2003 23:49:44 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.9/8.12.9/Submit) id h38JnigR043957; Tue, 8 Apr 2003 23:49:44 +0400 (MSD) Date: Tue, 8 Apr 2003 23:49:44 +0400 From: "Andrey A. Chernov" To: Bruce Evans Message-ID: <20030408194944.GA43822@nagual.pp.ru> References: <20030408164614.GA7236@comp.chem.msu.su> <20030409044301.J628@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030409044301.J628@gamplex.bde.org> User-Agent: Mutt/1.5.4i cc: arch@freebsd.org cc: Yar Tikhiy Subject: Re: termios & non-blocking I/O X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2003 19:49:48 -0000 On Wed, Apr 09, 2003 at 05:33:28 +1000, Bruce Evans wrote: > The spec is not very clear, but I think it means to say to return > -1/EAGAIN (it says that first). POSIX says: IEEE Std 1003.1-200x does not specify whether the setting of O_NONBLOCK takes precedence over MIN or TIME settings. Therefore, if O_NONBLOCK is set, read( ) may return immediately, regardless of the setting of MIN or TIME. Also, if no data is available, read( ) may either return 0, or return -1 with errno set to [EAGAIN]. -- Andrey A. Chernov http://ache.pp.ru/