Searched refs:trap (Results 1 – 25 of 243) sorted by relevance
12345678910
2 traps=$(${SH} -c 'trap "echo bad" 0; trap - 0; trap')4 traps=$(${SH} -c 'trap "echo bad" 0; trap "" 0; trap')5 expected_traps=$(${SH} -c 'trap "" EXIT; trap')7 traps=$(${SH} -c 'trap "echo bad" 0; trap 0; trap')9 traps=$(${SH} -c 'trap "echo bad" 0; trap -- 0; trap')11 traps=$(${SH} -c 'trap "echo bad" 0 1 2; trap - 0 1 2; trap')13 traps=$(${SH} -c 'trap "echo bad" 0 1 2; trap "" 0 1 2; trap')14 expected_traps=$(${SH} -c 'trap "" EXIT HUP INT; trap')16 traps=$(${SH} -c 'trap "echo bad" 0 1 2; trap 0 1 2; trap')18 traps=$(${SH} -c 'trap "echo bad" 0 1 2; trap -- 0 1 2; trap')
3 trap - USR14 initial=$(trap)5 trap -- -l USR16 added=$(trap)8 trap - USR19 second=$(trap)12 added2=$(trap)13 added3=$(trap --)16 trap -- - USR117 third=$(trap)
3 trap '' garbage && exit 34 trap - garbage && exit 35 trap true garbage && exit 36 trap '' 99999 && exit 37 trap - 99999 && exit 38 trap true 99999 && exit 3
1 # This is really a test for outqstr(), which is readily accessible via trap.6 trap -- "$teststring" USR17 traps=$(trap)12 # in the normative description of the trap builtin shows the14 echo '$(trap) is broken'17 trap - USR119 traps2=$(trap)
2 test "$(trap 'echo trapped' EXIT; :)" = trapped || exit 14 test "$(trap 'echo trapped' EXIT; /usr/bin/true)" = trapped || exit 16 result=$(${SH} -c 'trap "echo trapped" EXIT; /usr/bin/false')10 result=$(${SH} -c 'trap "echo trapped" EXIT; exec /usr/bin/false')15 trap 'result=$((result+1))' INT
2 # Check that the return statement will not break the EXIT trap, ie. all3 # trap commands are executed before the script exits.5 test "$(trap 'printf trap; echo ped' EXIT; f() { return; }; f)" = trapped || exit 1
3 # further trap names in the same trap command after an invalid one.5 test -n "$(trap true garbage TERM 2>/dev/null || trap)" || exit 3
2 # Check that the return statement will not break the USR1 trap, ie. all3 # trap commands are executed before the script resumes.5 result=$(${SH} -c 'trap "printf trap; echo ped" USR1; f() { return $(kill -USR1 $$); }; f')
3 trap 'rm -rf $T' 012 trap 'trap "" PIPE; echo trapped >&3 2>/dev/null' PIPE
2 test "$(trap 'printf trap; echo ped' EXIT; f() { :; }; f)" = trapped || exit 1
2 # exit without arguments differs from exit $? in an EXIT trap.4 trap 'false; exit' 0
2 # exit without arguments is the same as exit $? outside a trap.4 trap 'true; true' 0
2 # exit with an argument should overwrite the exit status in an EXIT trap.4 trap 'true; exit $?' 0
3 trap 'rm -rf $T' 07 trap trapped=1 QUIT
4 trap 'trap "echo bad" USR1
199 if (trap[signo]) in trapcmd()200 ckfree(trap[signo]); in trapcmd()201 trap[signo] = action; in trapcmd()218 for (tp = trap ; tp <= &trap[NSIG - 1] ; tp++) { in clear_traps()223 if (tp != &trap[0]) in clear_traps()224 setsignal(tp - trap); in clear_traps()239 for (tp = trap ; tp <= &trap[NSIG - 1] ; tp++) { in have_traps()363 return (trap[SIGCHLD] != NULL && *trap[SIGCHLD] != '\0'); in issigchldtrapped()386 if (trap[signo] != NULL && trap[signo][0] != '\0' && in onsig()413 if (trap[i]) { in dotrap()[all …]
11 check $LINENO "$(trap "echo bye" EXIT; : >/dev/null)" bye12 check $LINENO "$(trap "echo bye" EXIT; { :; } >/dev/null)" bye13 check $LINENO "$(trap "echo bye" EXIT; (:) >/dev/null)" bye14 check $LINENO "$(trap "echo bye" EXIT; (: >/dev/null))" bye15 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; : >/dev/null')" bye16 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; { :; } >/dev/null')" bye17 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; (:) >/dev/null')" bye18 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; (: >/dev/null)')" bye
11 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; f >/dev/null)" bye12 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; { f; } >/dev/null)" bye13 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; (f) >/dev/null)" bye14 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; (f >/dev/null))" bye15 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; f >/dev/null')" bye16 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; { f; } >/dev/null')" bye17 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; (f) >/dev/null')" bye18 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; (f >/dev/null)')" bye
3 trap 'rm -rf $T' 06 # Use a trap, not the default action, since the shell may catch SIGINT and8 { trap 'exit 5' TERM; read dummy <fifo1; exit 4; } &
3 trap 'rm -rf $T' 06 # Use a trap, not the default action, since the shell may catch SIGINT and8 { set -C; trap 'exit 5' TERM; read dummy <fifo1; exit 4; } &
3 trap 'rm -rf $T' 06 { trap - INT; : >fifo1; sleep 5 & wait; exit 4; } &
2852 // .trap variants2856 "llvm.nvvm.suld.1d.i8.trap">;2860 "llvm.nvvm.suld.1d.i16.trap">;2864 "llvm.nvvm.suld.1d.i32.trap">;2868 "llvm.nvvm.suld.1d.i64.trap">;2946 "llvm.nvvm.suld.2d.i8.trap">;2950 "llvm.nvvm.suld.2d.i16.trap">;2954 "llvm.nvvm.suld.2d.i32.trap">;2958 "llvm.nvvm.suld.2d.i64.trap">;3036 "llvm.nvvm.suld.3d.i8.trap">;[all …]
8 6 Trace/BPT trap10 8 IOT trap13 11 EMT trap