zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@hydra.ifh.de>
To: becker@Atria.com
Cc: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: zsh-beta12 read -q
Date: Mon, 27 Nov 1995 17:56:36 +0100	[thread overview]
Message-ID: <9511271656.AA07662@hydra.ifh.de> (raw)
In-Reply-To: "becker@phobos.atria.com"'s message of "Mon, 27 Nov 1995 11:07:40 MET." <9511271607.AA01231@phobos>

becker@phobos.atria.com wrote:
> from within a shell script, this script hangs in my xterm.
> 
>     % cat sample_script
>     read -q 'answ?Continue? [n] :'
>     echo "test done; returned $? "

I posted this patch to fix it (read -k too)... since the symptoms it
fixes are different on my machine (it messes up the terminal but
doesn't hang) I'd appreciate a confirmation that it fixes it in this
case too.

The best theory is it's related to the fact that various terminal
stuff is now delayed in interactive shells to avoid causing problems
when the shell is put into the background.

*** Src/builtin.c.ti	Tue Nov  7 09:48:32 1995
--- Src/builtin.c	Wed Nov  8 16:36:58 1995
***************
*** 4615,4620 ****
--- 4615,4622 ----
  	    fflush(stderr);
  	    return 1;
  	}
+ 	if (!isset(INTERACTIVE))
+ 	    gettyinfo(&shttyinfo);
  	/* sort out the number of characters to read */
  	if (*args && idigit(**args)) {
  	    if (!(nchars = atoi(*args)))
***************
*** 4804,4809 ****
--- 4806,4813 ----
  	    fflush(stderr);
  	    return 1;
  	}
+ 	if (!isset(INTERACTIVE))
+ 	    gettyinfo(&shttyinfo);
  
  	/* set up the buffer */
  	readbuf = (char *)zalloc(2);

-- 
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:[~1995-11-27 17:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-27 16:07 Paul H. Becker
1995-11-27 16:56 ` 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=9511271656.AA07662@hydra.ifh.de \
    --to=pws@hydra.ifh.de \
    --cc=becker@Atria.com \
    --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).