Home
last modified time | relevance | path

Searched refs:trap (Results 1 – 25 of 243) sorted by relevance

12345678910

/freebsd/bin/sh/tests/builtins/
H A Dtrap16.02 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')
H A Dtrap5.03 trap - USR1
4 initial=$(trap)
5 trap -- -l USR1
6 added=$(trap)
8 trap - USR1
9 second=$(trap)
12 added2=$(trap)
13 added3=$(trap --)
16 trap -- - USR1
17 third=$(trap)
H A Dtrap3.03 trap '' garbage && exit 3
4 trap - garbage && exit 3
5 trap true garbage && exit 3
6 trap '' 99999 && exit 3
7 trap - 99999 && exit 3
8 trap true 99999 && exit 3
H A Dtrap2.01 # This is really a test for outqstr(), which is readily accessible via trap.
6 trap -- "$teststring" USR1
7 traps=$(trap)
12 # in the normative description of the trap builtin shows the
14 echo '$(trap) is broken'
17 trap - USR1
19 traps2=$(trap)
H A Dtrap1.02 test "$(trap 'echo trapped' EXIT; :)" = trapped || exit 1
4 test "$(trap 'echo trapped' EXIT; /usr/bin/true)" = trapped || exit 1
6 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
H A Dtrap10.02 # Check that the return statement will not break the EXIT trap, ie. all
3 # trap commands are executed before the script exits.
5 test "$(trap 'printf trap; echo ped' EXIT; f() { return; }; f)" = trapped || exit 1
H A Dtrap8.03 # 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
H A Dtrap11.02 # Check that the return statement will not break the USR1 trap, ie. all
3 # trap commands are executed before the script resumes.
5 result=$(${SH} -c 'trap "printf trap; echo ped" USR1; f() { return $(kill -USR1 $$); }; f')
H A Dtrap4.03 trap 'rm -rf $T' 0
12 trap 'trap "" PIPE; echo trapped >&3 2>/dev/null' PIPE
H A Dtrap9.02 test "$(trap 'printf trap; echo ped' EXIT; f() { :; }; f)" = trapped || exit 1
H A Dexit3.02 # exit without arguments differs from exit $? in an EXIT trap.
4 trap 'false; exit' 0
H A Dexit2.82 # exit without arguments is the same as exit $? outside a trap.
4 trap 'true; true' 0
H A Dexit1.02 # exit with an argument should overwrite the exit status in an EXIT trap.
4 trap 'true; exit $?' 0
H A Dwait4.03 trap 'rm -rf $T' 0
7 trap trapped=1 QUIT
H A Dwait5.03 trap 'rm -rf $T' 0
7 trap trapped=1 QUIT
H A Dtrap17.04 trap 'trap "echo bad" USR1
/freebsd/bin/sh/
H A Dtrap.c199 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 …]
/freebsd/bin/sh/tests/execution/
H A Dredir6.011 check $LINENO "$(trap "echo bye" EXIT; : >/dev/null)" bye
12 check $LINENO "$(trap "echo bye" EXIT; { :; } >/dev/null)" bye
13 check $LINENO "$(trap "echo bye" EXIT; (:) >/dev/null)" bye
14 check $LINENO "$(trap "echo bye" EXIT; (: >/dev/null))" bye
15 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; : >/dev/null')" bye
16 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; { :; } >/dev/null')" bye
17 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; (:) >/dev/null')" bye
18 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; (: >/dev/null)')" bye
H A Dredir7.011 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; f >/dev/null)" bye
12 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; { f; } >/dev/null)" bye
13 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; (f) >/dev/null)" bye
14 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; (f >/dev/null))" bye
15 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; f >/dev/null')" bye
16 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; { f; } >/dev/null')" bye
17 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; (f) >/dev/null')" bye
18 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; (f >/dev/null)')" bye
H A Dbg11.03 trap 'rm -rf $T' 0
6 # Use a trap, not the default action, since the shell may catch SIGINT and
8 { trap 'exit 5' TERM; read dummy <fifo1; exit 4; } &
H A Dbg13.03 trap 'rm -rf $T' 0
6 # Use a trap, not the default action, since the shell may catch SIGINT and
8 { set -C; trap 'exit 5' TERM; read dummy <fifo1; exit 4; } &
H A Dbg12.03 trap 'rm -rf $T' 0
6 { trap - INT; : >fifo1; sleep 5 & wait; exit 4; } &
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DIntrinsicsNVVM.td2852 // .trap variants
2856 "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 …]
/freebsd/contrib/tcsh/nls/greek/
H A Dset28 6 Trace/BPT trap
10 8 IOT trap
13 11 EMT trap
/freebsd/contrib/tcsh/nls/russian/
H A Dset28 6 Trace/BPT trap
10 8 IOT trap
13 11 EMT trap

12345678910