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

Re: Wordcode functions with empty bodies



On Jun 14,  4:08pm, Peter Stephenson wrote:
} Subject: Re: Wordcode functions with empty bodies
}
} > Continue, it hits endtrapscode() and from there
} > frees the eprog in sigfuncs[28]. BUT it doesn't reset sigfuncs[28].
} 
} Oh, I see, sorry.  The answer is it should disappear from there at the
} point where it would do with an ordinary (non-function) trap.  [...]
} 
} Ideally this value shouldn't be used anyway, because sigtrapped[SIGWINCH]
} is now clear.  That was a problem in dosavetrap() --- it was correct to
} save the trap, because it needs something to prompt it to delete the local
} trap even if it just unsets it, but it should have checked sigtrapped to
} see if the sigfuncs value was valid.

This has fixed the "prompt bart" crash, though I still don't quite follow
why putting a `:' command in the function body (instead of using an empty
function) prevented the crash before.

However, either Clint's 11839 or my 11857 is still needed to prevent the
crash reported in 11837, so there's still something fishy going on with
saving and restoring the EXIT trap.  Or else the lack of 11857 _is_ the
fishy thing that's going on, but I don't follow how the ZSIG_FUNC bit is
set when there is no function.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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