projects
/
platform
/
upstream
/
bash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bash-4.2 distribution sources and documentation
[platform/upstream/bash.git]
/
builtins
/
source.def
diff --git
a/builtins/source.def
b/builtins/source.def
index
72627db
..
71908b8
100644
(file)
--- a/
builtins/source.def
+++ b/
builtins/source.def
@@
-80,6
+80,8
@@
extern int errno;
#endif /* !errno */
extern int posixly_correct;
#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));
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 (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
return (EXECUTION_FAILURE);
}
else