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

Re: PATCH: Re: Segmentation fault 3.1.7-pre-3/4



On May 23,  3:44pm, Bart Schaefer wrote:
} Subject: Re: PATCH: Re: Segmentation fault 3.1.7-pre-3/4
}
} I personally would prefer the following patch, but I haven't committed
} it yet.

And a good thing, too, as I just realized that it will cause SHTTY to be
closed improperly.

Sigh.

} +	    } else if (!shout) {
} +		haso = 1;
} +		oshout = shout;
} +		init_shout();
}  	    }

What horrible things would happen if `haso' were simply left as 0 here?
Then `shout' would remain open, but as it's only pointing to the fd that
is already open for SHTTY, and no other part of the code ever tests shout
for non-zero-ness (except init_io() which clobbers SHTTY anyway), there
doesn't seem to be any problem except the tiny overhead of one extra FILE
structure.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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