From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13623 invoked from network); 23 May 2000 08:34:46 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 May 2000 08:34:46 -0000 Received: (qmail 8975 invoked by alias); 23 May 2000 08:34:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11524 Received: (qmail 8968 invoked from network); 23 May 2000 08:34:34 -0000 Date: Tue, 23 May 2000 10:31:36 +0200 (MET DST) Message-Id: <200005230831.KAA23545@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Bernd Eggink's message of Tue, 23 May 2000 09:41:01 +0200 Subject: PATCH: Re: Segmentation fault 3.1.7-pre-3/4 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