summaryrefslogtreecommitdiff
path: root/sig.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-11-28 14:41:26 -0500
committerChet Ramey <chet.ramey@case.edu>2011-11-28 14:41:26 -0500
commitd3a24ed242e91e6afb53b2cbf38b89667637168d (patch)
treeb67e38d2eca8abd31da74e1dcbe69dd1bfa679a3 /sig.c
parent7117c2d221b2aed4ede8600f6a36b7c1454b4f55 (diff)
downloadbash-d3a24ed242e91e6afb53b2cbf38b89667637168d.tar.gz
Initial devel branch import from bash-3.0-alpha
Diffstat (limited to 'sig.c')
-rw-r--r--sig.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sig.c b/sig.c
index 21a57ae1..465535b7 100644
--- a/sig.c
+++ b/sig.c
@@ -51,6 +51,7 @@
#endif
extern int last_command_exit_value;
+extern int last_command_exit_signal;
extern int return_catch_flag;
extern int loop_level, continuing, breaking;
extern int parse_and_execute_level, shell_initialized;
@@ -343,6 +344,8 @@ throw_to_top_level ()
if (interrupt_state)
return;
+ last_command_exit_signal = (last_command_exit_value > 128) ?
+ (last_command_exit_value - 128) : 0;
last_command_exit_value |= 128;
/* Run any traps set on SIGINT. */