diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:13:32 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:15:01 -0700 |
commit | 2d698b6e42d8dca191ac795ef5dba3bf62496eec (patch) | |
tree | ac5e0b67043c50f49160e9fe407435706cf30444 /builtins/trap.def | |
parent | f1250933e4a2ac09a3d0b25b3877068e12f44da5 (diff) | |
download | vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.tar.gz vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.zip |
Integrate bash 3.2 version
This is merge of current Debian stable (Lenny) version of Bash
with Vyatta changes.
Diffstat (limited to 'builtins/trap.def')
-rw-r--r-- | builtins/trap.def | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/builtins/trap.def b/builtins/trap.def index 669bea7..2735791 100644 --- a/builtins/trap.def +++ b/builtins/trap.def @@ -1,7 +1,7 @@ This file is trap.def, from which is created trap.c. It implements the builtin "trap" in Bash. -Copyright (C) 1987-2005 Free Software Foundation, Inc. +Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -87,7 +87,7 @@ int trap_builtin (list) WORD_LIST *list; { - int list_signal_names, display, result, opt, first_signal; + int list_signal_names, display, result, opt; list_signal_names = display = 0; result = EXECUTION_SUCCESS; @@ -124,7 +124,10 @@ trap_builtin (list) first_arg = list->word->word; first_signal = first_arg && *first_arg && all_digits (first_arg) && signal_object_p (first_arg, opt); - /* Backwards compatibility */ + /* Backwards compatibility. XXX - question about whether or not we + should throw an error if an all-digit argument doesn't correspond + to a valid signal number (e.g., if it's `50' on a system with only + 32 signals). */ if (first_signal) operation = REVERT; /* When in posix mode, the historical behavior of looking for a @@ -176,7 +179,7 @@ trap_builtin (list) if (interactive) set_signal_handler (SIGINT, sigint_sighandler); else - set_signal_handler (SIGINT, termination_unwind_protect); + set_signal_handler (SIGINT, termsig_sighandler); break; case SIGQUIT: |