zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Re: Segmentation fault 3.1.7-pre-3/4
@ 2000-05-23  8:31 Sven Wischnowsky
  2000-05-23  9:10 ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Wischnowsky @ 2000-05-23  8:31 UTC (permalink / raw)
  To: zsh-workers


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-05-27  8:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-23  8:31 PATCH: Re: Segmentation fault 3.1.7-pre-3/4 Sven Wischnowsky
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

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).