zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list),
	"Greg J. Badros" <gjb@cs.duke.edu>
Subject: Re: Zsh Not resetting stdin O_NONBLOCK on Solaris
Date: Thu, 12 Sep 1996 15:08:36 +0200	[thread overview]
Message-ID: <199609121308.PAA10294@hydra.ifh.de> (raw)
In-Reply-To: ""Greg J. Badros""'s message of "Mon, 09 Sep 1996 14:15:32 MET." <Pine.SOL.3.93.960909140556.25727A-100000@moa.cs.duke.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 <pws@ifh.de>       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.


      reply	other threads:[~1996-09-12 13:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-09 18:15 Greg J. Badros
1996-09-12 13:08 ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199609121308.PAA10294@hydra.ifh.de \
    --to=pws@ifh.de \
    --cc=gjb@cs.duke.edu \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).