1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

fix autoloaded trap bug; rejig use of trapfuncs

(now traplists); improve trap tests
This commit is contained in:
Peter Stephenson 2005-02-06 20:36:09 +00:00
parent 64c2db0ca2
commit 05b06b1c08
9 changed files with 129 additions and 41 deletions

View file

@ -332,13 +332,12 @@ setfunction(char *name, char *val, int dis)
if (!strncmp(name, "TRAP", 4) &&
(sn = getsignum(name + 4)) != -1) {
if (settrap(sn, shf->funcdef)) {
if (settrap(sn, NULL, ZSIG_FUNC)) {
freeeprog(shf->funcdef);
zfree(shf, sizeof(*shf));
zsfree(val);
return;
}
sigtrapped[sn] |= ZSIG_FUNC;
}
shfunctab->addnode(shfunctab, ztrdup(name), shf);
zsfree(val);