X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=error.c;h=1eac01c4a173820aadcf3a9b0335cf89febde11e;hb=98043138fc04542cf96d54c778949aa92cd505bd;hp=72da9f54040ea4f5209c25e7fee2e40fdc221bbe;hpb=0001803f0b9523c94fa2ede48eaecb047fef4524;p=platform%2Fupstream%2Fbash.git diff --git a/error.c b/error.c index 72da9f5..1eac01c 100644 --- a/error.c +++ b/error.c @@ -200,7 +200,11 @@ report_error (format, va_alist) va_end (args); if (exit_immediately_on_error) - exit_shell (1); + { + if (last_command_exit_value == 0) + last_command_exit_value = 1; + exit_shell (last_command_exit_value); + } } void