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

Re: SIGFPE crash



On 8 May 2011 02:05, Jon Mayo <jon.mayo@xxxxxxxxx> wrote:
> On Sat, May 7, 2011 at 3:27 PM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> This is assuming we want to do this at all, I am told that only
>> division will generate an exception on x86, but presumably other
>> arches behave differently, and bash behaves the same way too
>> (exception + die). Does some sort of standard have anything to say on
>> the matter? I'm guessing someone has thought of it before and clearly
>> nobody ever did anything about it.
>>
>
> perhaps scripts that care can just use a trap? and all my worrying was
> for nothing?
> mostly I ran into the issue while I dropped out of vi to do some
> calculations, and ended up having zsh crash and had to recover my
> editing session. minor annoyance really.

Using a trap doesn't seem to work, it just causes an infinite loop
running the instruction over and over again.
fwiw, bash behaves the same way, both with regards to crashing and
looping on the trap.

-- 
Mikael Magnusson



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