aboutsummaryrefslogtreecommitdiffstats
path: root/builtins/source.def
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-11-22 19:11:26 -0500
committerChet Ramey <chet.ramey@case.edu>2011-11-22 19:11:26 -0500
commit495aee441b75276e38c75694ccb455bb6463fdb9 (patch)
treef12907dbf62388e6c65dfa1c5e1199509936707e /builtins/source.def
parent30d188c2932d6ef609d894fefeb7e7b03ccff463 (diff)
downloadandroid_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.tar.gz
android_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.tar.bz2
android_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.zip
Bash-4.2 distribution sources and documentation
Diffstat (limited to 'builtins/source.def')
-rw-r--r--builtins/source.def7
1 files changed, 7 insertions, 0 deletions
diff --git a/builtins/source.def b/builtins/source.def
index 72627db..71908b8 100644
--- a/builtins/source.def
+++ b/builtins/source.def
@@ -80,6 +80,8 @@ extern int errno;
#endif /* !errno */
extern int posixly_correct;
+extern int last_command_exit_value;
+extern int executing_command_builtin;
static void maybe_pop_dollar_vars __P((void));
@@ -151,6 +153,11 @@ source_builtin (list)
if (source_searches_cwd == 0)
{
builtin_error (_("%s: file not found"), list->word->word);
+ if (posixly_correct && interactive_shell == 0 && executing_command_builtin == 0)
+ {
+ last_command_exit_value = 1;
+ jump_to_top_level (EXITPROG);
+ }
return (EXECUTION_FAILURE);
}
else