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:
parent
64c2db0ca2
commit
05b06b1c08
9 changed files with 129 additions and 41 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue