pub fn disableshfuncnode(hn: &str)Expand description
Port of disableshfuncnode(HashNode hn, UNUSED(int flags)) from Src/hashtable.c:855.
C body:
hn->flags |= DISABLED;
if (!strncmp(hn->nam, "TRAP", 4)) {
int sigidx = getsigidx(hn->nam + 4);
if (sigidx != -1) {
sigtrapped[sigidx] &= ~ZSIG_FUNC;
unsettrap(sigidx);
}
}Sets the DISABLED flag on the function entry; for TRAP* functions, also unsettraps the corresponding signal so the shell stops invoking the (now-disabled) trap. WARNING: param names don’t match C — Rust=(hn) vs C=(hn, flags)