zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: Segmentation fault 3.1.7-pre-3/4
Date: Tue, 23 May 2000 10:31:36 +0200 (MET DST)	[thread overview]
Message-ID: <200005230831.KAA23545@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Bernd Eggink's message of Tue, 23 May 2000 09:41:01 +0200


Bernd Eggink wrote:

> This gives a seg fault if executed in a script:
> 
>     read -q "REPLY?hm: "
> 
> Happens with pre-3 and pre-4, not with pre-1.

Oh, look Bart, there's the reason to not always use shout (11036).

The patch tries to make sure we're always on the save side. I
hope. It's different from the pre-11036 state.

But with zle not loaded, the

	zsh -c "read -q '?Can you see this? '" < /dev/null >& /dev/null

from 11036 doesn't show the prompt (but at least it doesn't segv
anymore). Is it right or wrong? Do we have to work around it?

Bye
 Sven

Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.18
diff -u -r1.18 builtin.c
--- Src/builtin.c	2000/05/19 15:10:54	1.18
+++ Src/builtin.c	2000/05/23 08:30:31
@@ -3440,8 +3440,8 @@
 	     *readpmpt && *readpmpt != '?'; readpmpt++);
 	if (*readpmpt++) {
 	    if (keys || isatty(0)) {
-		zputs(readpmpt, shout);
-		fflush(shout);
+		zputs(readpmpt, (shout ? shout : stderr));
+		fflush(shout ? shout : stderr);
 	    }
 	    readpmpt[-1] = '\0';
 	}

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-05-23  8:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-23  8:31 Sven Wischnowsky [this message]
2000-05-23  9:10 ` Peter Stephenson
2000-05-23 15:44   ` Bart Schaefer
2000-05-23 16:10     ` Bart Schaefer
2000-05-27  8:24       ` Bart Schaefer

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=200005230831.KAA23545@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).