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

Re: zsh malloc bug



At 2:20 PM +0100 2004-06-08, Peter Stephenson wrote:
>Dave Yost wrote:
>> zsh 4.2.0 hangs on my cygwin system when I try some of these scenarios.
>
>I couldn't get this to happen on Solaris 8 or Fedora Core 1.  I would be
>a bit suspicious about Cygwin, since they had to jump through lots of
>hoops to make it look like a UNIX environment.

It happens on Mac OS X.

>
>> BTW, the TRAPxxx documentation should be more explicit about whether trapping
>>  the event prevents exit
>
>Yes, it should say how the return status is handled and apparently it
>doesn't.  That's a big omission.

Not anymore!  Thanks for updating the doc and for sending the update along.

Dave

============== revised source
==============================
#!/bin/zsh

TRAPINT() {
	echo Interrupted
	exit 2
}

TRAPZERR() {
	reason=$?
	echo Failed command.
	exit $reason
}

TRAPEXIT() {
	echo exited normally
}

sleep $1

# Try ^C here sometimes.

echo after sleep

set -e

cp

echo after command



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