From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id XAA05670 for ; Thu, 12 Sep 1996 23:18:05 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id JAA13284; Thu, 12 Sep 1996 09:10:26 -0400 (EDT) Resent-Date: Thu, 12 Sep 1996 09:10:26 -0400 (EDT) Message-Id: <199609121308.PAA10294@hydra.ifh.de> X-Authentication-Warning: hydra.ifh.de: Host pws@localhost didn't use HELO protocol To: zsh-workers@math.gatech.edu (Zsh hackers list), "Greg J. Badros" Subject: Re: Zsh Not resetting stdin O_NONBLOCK on Solaris In-reply-to: ""Greg J. Badros""'s message of "Mon, 09 Sep 1996 14:15:32 MET." Date: Thu, 12 Sep 1996 15:08:36 +0200 From: Peter Stephenson Resent-Message-ID: <"_gsYx3.0.RF3.2l0Eo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2132 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu "Greg J. Badros" wrote: > Using zsh-3.0.0 on Solaris, if I start a program that sets non-blocking > input on stdin (using fcntl with O_NONBLOCK), and I then exit that program > using SIGINT (Ctrl-C), zsh doesn't seem to reset stdin back to blocking > input for future programs that the shell runs (though zle works fine). It's not clear to me this is a bug. Zle now doesn't use stdin, it sets up its own fd from the terminal, so it doesn't really care what's happened to stdin. A quick poll reveals that ksh resets O_NONBLOCK (interactively anyway), sh, csh and bash don't (and sh and csh react badly if it is set), with tcsh it seems to depend on the version (6.04 bombed badly, 6.05 reset it). This is not specific to Solaris, although some of the results may be. On the other hand, if you try `read line' with O_NONBLOCK set you come unstuck because that does use stdin. Then again, maybe you could have set non-blocking input deliberately, which after all gives just the effect you would expect? It's still not clear that it's the shell's business to tidy this up, or if it should, under what circumstances that should be. Sorry, that's not very helpful. -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.