static void disableshfuncnode(HashNode hn, UNUSED(int flags)) { hn->flags |= DISABLED; if (!strncmp(hn->nam, "TRAP", 4)) { int signum = getsignum(hn->nam + 4); sigtrapped[signum] &= ~ZSIG_FUNC; sigfuncs[signum] = NULL; unsettrap(signum); } }
HashNode removeshfuncnode(HashTable ht, char *nam) { HashNode hn; if ((hn = removehashnode(shfunctab, nam))) { if (!strncmp(hn->nam, "TRAP", 4)) unsettrap(getsignum(hn->nam + 4)); return hn; } else return NULL; }
static HashNode removeshfuncnode(UNUSED(HashTable ht), char *nam) { HashNode hn; int signum; if (!strncmp(nam, "TRAP", 4) && (signum = getsignum(nam + 4)) != -1) hn = removetrap(signum); else hn = removehashnode(shfunctab, nam); return hn; }
static void enableshfuncnode(HashNode hn, UNUSED(int flags)) { Shfunc shf = (Shfunc) hn; shf->node.flags &= ~DISABLED; if (!strncmp(shf->node.nam, "TRAP", 4)) { int signum = getsignum(shf->node.nam + 4); if (signum != -1) { settrap(signum, NULL, ZSIG_FUNC); } } }
static void enableshfuncnode(HashNode hn, UNUSED(int flags)) { Shfunc shf = (Shfunc) hn; shf->flags &= ~DISABLED; if (!strncmp(shf->nam, "TRAP", 4)) { int signum = getsignum(shf->nam + 4); if (signum != -1) { settrap(signum, shf->funcdef); sigtrapped[signum] |= ZSIG_FUNC; } } }