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

Re: zsh malloc bug



At 10:32 AM +0100 2004-06-02, Peter Stephenson wrote:
>Dave Yost wrote:
>> Z% echo $ZSH_VERSION
>> 4.1.1
>> Z% uname -a
>> Darwin ip2 7.4.0 Darwin Kernel Version 7.4.0: Wed May 12 16:58:24 PDT 2004; r
>> oot:xnu/xnu-517.7.7.obj~7/RELEASE_PPC  Power Macintosh powerpc
>
>Thanks for the report... could you try 4.2.0?  Traps have changed in
>various ways and this doesn't happen after a short test on my latest
>code.

zsh 4.2.0 hangs on my cygwin system when I try some of these scenarios.

BTW, the TRAPxxx documentation should be more explicit about whether trapping the event prevents exit and what happens if you exit explicitly from within the trap.

Thanks

Dave

==============================
#!/bin/zsh

reason=

TRAPINT() {
	#echo int
	reason=int
	exit 100
}

TRAPZERR() {
	#echo zerr
	reason=zerr
	exit 101 # is this necessary?
}

TRAPEXIT() {
	echo exit $reason
	# exit?
}

sleep $1

# Try ^C here sometimes.

echo after sleep

set -e

cp

echo after command



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