From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28336 invoked from network); 23 Jul 1998 08:16:57 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 23 Jul 1998 08:16:57 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id EAA21310; Thu, 23 Jul 1998 04:09:51 -0400 (EDT) Resent-Date: Thu, 23 Jul 1998 04:09:51 -0400 (EDT) From: yamagata@nwgpc.kek.jp To: zsh-workers@math.gatech.edu Subject: blocking read stdin patch (Re: zsh-workers: zsh-3.1.4) In-Reply-To: Your message of "Mon, 1 Jun 1998 09:19:24 +0100" <199806010819.JAA27897@diamond.tao.co.uk> References: <199806010819.JAA27897@diamond.tao.co.uk> X-Mailer: Mew version 1.93b36 on Emacs 20.2 / Mule 3.0 (MOMIJINOGA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19980723171149T.yamagata@nwgpc.kek.jp> Date: Thu, 23 Jul 1998 17:11:49 +0900 X-Dispatcher: imput version 980702 Resent-Message-ID: <"wbzvh2.0.vC5.E_kjr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4247 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello, In message <199806010819.JAA27897@diamond.tao.co.uk>, Zefram wrote > > -----BEGIN PGP SIGNED MESSAGE----- > > Zsh version 3.1.4 has been released, and an announcement posted to > zsh-announce. (snip) > 3950 set blocking read on stdin > I'm rather dubious about this EWOULDBLOCK business. I think this > should be EAGAIN. I'm also a bit suspicious about where the blocking > status is being changed, but I haven't examined it in detail yet. (snip) In 4.2BSD, non-blocking read will be return by EWOULDBLOCK, But in POSIX it should be EAGAIN. Some OS (like SunOS4.1.X or Ultrix) may return both error. It seems to be decided by compile environment or what flag was used for blocking read. In SunOS 4.1.X, When set O_NONBLOCK, will be EWOULDBLOCK, When set O_NDELAY, will be EAGAIN. In 4.4BSD and Digital UNIX(3.2 and 4.0), EWOULDBLOCK and EAGAIN are same value, thus Zoltan's patch works fine. yamagata