"Fossies" - the Fresh Open Source Software Archive

Member "bashdb-5.0-1.1.0/test/data/sig-Darwin.right" (2 Sep 2019, 3873 Bytes) of package /linux/privat/bashdb-5.0-1.1.0.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "sig-Darwin.right": 4.4-1.0.1_vs_5.0-1.1.0.

    1 (sig.sh:7):
    2 7:	if [[ "$1"x != x ]] ; then
    3 +# Test that debugged program's signals are saved and restored across
    4 +# debug calls.
    5 +### Testing that we have our signal set up...
    6 +info signals
    7 Signal       Stop   Print   Stack     Value
    8 EXIT         stop   noprint nostack   trap -- '_Dbg_exit_handler "$BASH_COMMAND"' EXIT
    9 EXIT         stop   noprint nostack   trap -- '_Dbg_exit_handler "$BASH_COMMAND"' EXIT
   10 SIGINT       stop   print   showstack trap -- '_Dbg_sig_handler 2 "$BASH_COMMAND" "$@"' SIGINT
   11 SIGQUIT      stop   print   showstack trap -- '_Dbg_sig_handler 3 "$BASH_COMMAND" "$@"' SIGQUIT
   12 SIGILL       stop   print   showstack trap -- '_Dbg_sig_handler 4 "$BASH_COMMAND" "$@"' SIGILL
   13 SIGTRAP      stop   print   showstack trap -- '_Dbg_sig_handler 5 "$BASH_COMMAND" "$@"' SIGTRAP
   14 SIGTERM      stop   print   showstack trap -- '_Dbg_sig_handler 15 "$BASH_COMMAND" "$@"' SIGTERM
   15 SIGXFSZ      nostop noprint nostack   trap -- '' SIGXFSZ
   16 +### Testing handle command...
   17 +handle TERM nostack
   18 +handle foo
   19 ** Bad signal name: foo
   20 +handle 1000
   21 ** Bad signal number: 1000
   22 +handle TERM bogus
   23 ** Need to give a command: stop, nostop, stack, nostack, print, noprint
   24 +eval kill -TERM $$
   25 Program received signal SIGTERM (15)...
   26 +### Should not have printed a stack trace above...
   27 +handle TERM noprint
   28 +handle TERM stack
   29 +handle INT nostop
   30 +eval kill -TERM $$
   31 Program received signal SIGTERM (15)...
   32 ->0 in file `bashdb_eval_5040' at line 1
   33 ##1 source("bashdb_eval_5040") called from file `eval.sh' at line 105
   34 ##2 _Dbg_do_eval("kill", "-TERM", "$$") called from file `processor.sh' at line 293
   35 ##3 _Dbg_onecmd("eval", "kill -TERM $$") called from file `processor.sh' at line 202
   36 ##4 _Dbg_process_commands() called from file `hook.sh' at line 267
   37 ##5 _Dbg_hook_enter_debugger("on receiving a signal", "noprint") called from file `sig.sh' at line 202
   38 ##6 _Dbg_sig_handler("15", "[[ "$1"x != x ]]") called from file `bashdb_eval_5040' at line 1
   39 ##7 source("bashdb_eval_5040") called from file `eval.sh' at line 105
   40 ##8 _Dbg_do_eval("kill", "-TERM", "$$") called from file `processor.sh' at line 293
   41 ##9 _Dbg_onecmd("eval", "kill -TERM $$") called from file `processor.sh' at line 202
   42 ##10 _Dbg_process_commands() called from file `hook.sh' at line 267
   43 ##11 _Dbg_hook_enter_debugger("after being stepped") called from file `hook.sh' at line 183
   44 ##12 _Dbg_debug_trap_handler("0", "[[ "$1"x != x ]]") called from file `sig.sh' at line 7
   45 ##13 source("sig.sh") called from file `bashdb' at line 127
   46 ##14 main() called from file `bashdb' at line 0
   47 +info signals
   48 Signal       Stop   Print   Stack     Value
   49 EXIT         stop   noprint nostack   trap -- '_Dbg_exit_handler "$BASH_COMMAND"' EXIT
   50 EXIT         stop   noprint nostack   trap -- '_Dbg_exit_handler "$BASH_COMMAND"' EXIT
   51 SIGINT       nostop print   showstack trap -- '_Dbg_sig_handler 2 "$BASH_COMMAND" "$@"' SIGINT
   52 SIGQUIT      stop   print   showstack trap -- '_Dbg_sig_handler 3 "$BASH_COMMAND" "$@"' SIGQUIT
   53 SIGILL       stop   print   showstack trap -- '_Dbg_sig_handler 4 "$BASH_COMMAND" "$@"' SIGILL
   54 SIGTRAP      stop   print   showstack trap -- '_Dbg_sig_handler 5 "$BASH_COMMAND" "$@"' SIGTRAP
   55 SIGTERM      stop   noprint showstack trap -- '_Dbg_sig_handler 15 "$BASH_COMMAND" "$@"' SIGTERM
   56 SIGXFSZ      nostop noprint nostack   trap -- '' SIGXFSZ
   57 +continue
   58 $? is 0
   59 $? is 0
   60 Program received signal SIGINT (2)...
   61 ->0 in file `sig.sh' at line 55
   62 ##1 source("sig.sh") called from file `bashdb' at line 127
   63 ##2 main() called from file `bashdb' at line 0
   64 Program received signal SIGINT (2)...
   65 ->0 in file `sig.sh' at line 55
   66 ##1 source("sig.sh") called from file `bashdb' at line 127
   67 ##2 main() called from file `bashdb' at line 0
   68 Debugged program terminated normally. Use q to quit or R to restart.
   69 +### Should have printed a stack trace above...
   70 +where 1
   71 ** The program is not being run.
   72 +quit
   73 bashdb: That's all, folks...