Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 4.3.4 crashes in prompt-related code under Mac OS X



On 2007-10-22 11:10:55 +0100, Peter Stephenson wrote:
> Or maybe "shout" has got into some unusable state.  I suppose it's not
> unreasonable to test it's not NULL, although it's rather paranoid.

I don't know what is "shout", but I recall that the bug occurs only
after some command (ssh, called via a zsh wrapper function) has run
for several days. So, the environment had the time to change...

I've reinstalled zsh with the patch.

> --- Src/utils.c	5 Sep 2007 16:16:17 -0000	1.167
> +++ Src/utils.c	22 Oct 2007 10:09:41 -0000
> @@ -1160,7 +1160,7 @@
>      int period = getiparam("PERIOD");
>      int mailcheck = getiparam("MAILCHECK");
>  
> -    if (isset(PROMPTSP) && isset(PROMPTCR) && !use_exit_printed) {
> +    if (isset(PROMPTSP) && isset(PROMPTCR) && !use_exit_printed && shout) {

zsh 4.3.4 doesn't have !use_exit_printed, so I modified the above
lines in the following way:

-    if (isset(PROMPTSP) && isset(PROMPTCR)) {
+    if (isset(PROMPTSP) && isset(PROMPTCR) && !use_exit_printed && shout) {

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author