diff options
Diffstat (limited to 'Test/C03traps.ztst')
-rw-r--r-- | Test/C03traps.ztst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index 74b83f33a..828a3d10f 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -626,6 +626,21 @@ F:Must be tested with a top-level script rather than source or function >before-out >before-in + if zmodload zsh/system 2>/dev/null; then + ( + trap 'echo TERM; exit 2' TERM + trap 'echo EXIT' EXIT + kill -s TERM "$sysparams[pid]" + echo 'FATAL: we should never get here!' 1>&2 + exit 1 + ) + else + ZTST_skip="zsh/system library not found." + fi +2:EXIT trap from TERM trap +>TERM +>EXIT + %clean rm -f TRAPEXIT |