diff options
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index fbbdb06b0..edcb7c028 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -12258,6 +12258,9 @@ dotcmd(int argc, char **argv) | |||
12258 | /* "false; . empty_file; echo $?" should print 0, not 1: */ | 12258 | /* "false; . empty_file; echo $?" should print 0, not 1: */ |
12259 | exitstatus = 0; | 12259 | exitstatus = 0; |
12260 | 12260 | ||
12261 | /* This aborts if file isn't found, which is POSIXly correct. | ||
12262 | * bash returns exitcode 1 instead. | ||
12263 | */ | ||
12261 | fullname = find_dot_file(argv[1]); | 12264 | fullname = find_dot_file(argv[1]); |
12262 | 12265 | ||
12263 | argv += 2; | 12266 | argv += 2; |
@@ -12269,6 +12272,9 @@ dotcmd(int argc, char **argv) | |||
12269 | shellparam.p = argv; | 12272 | shellparam.p = argv; |
12270 | }; | 12273 | }; |
12271 | 12274 | ||
12275 | /* This aborts if file can't be opened, which is POSIXly correct. | ||
12276 | * bash returns exitcode 1 instead. | ||
12277 | */ | ||
12272 | setinputfile(fullname, INPUT_PUSH_FILE); | 12278 | setinputfile(fullname, INPUT_PUSH_FILE); |
12273 | commandname = fullname; | 12279 | commandname = fullname; |
12274 | cmdloop(0); | 12280 | cmdloop(0); |