Skip to main content

TRAP_STATE

Static TRAP_STATE 

Source
pub static TRAP_STATE: Atomic<i32>
Expand description

Port of int trap_state; from Src/exec.c:134. Tracks whether a trap handler is currently being processed and, paired with TRAP_RETURN below, whether a return inside the trap should promote to TRAP_STATE_FORCE_RETURN to unwind the trap caller.

Values: TRAP_STATE_INACTIVE = 0, TRAP_STATE_PRIMED = 1, TRAP_STATE_FORCE_RETURN = 2 (see Src/zsh.h).