ash: add comment about failures in source builtin. No code changes.
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 17 Mar 2013 13:25:22 +0000 (14:25 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 17 Mar 2013 13:25:22 +0000 (14:25 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c

index fbbdb06b00a6b9d7f3e97b61ccabae199ac18c2e..edcb7c0288662e0ea58e40b5e9fd026166ace78c 100644 (file)
@@ -12258,6 +12258,9 @@ dotcmd(int argc, char **argv)
        /* "false; . empty_file; echo $?" should print 0, not 1: */
        exitstatus = 0;
 
+       /* This aborts if file isn't found, which is POSIXly correct.
+        * bash returns exitcode 1 instead.
+        */
        fullname = find_dot_file(argv[1]);
 
        argv += 2;
@@ -12269,6 +12272,9 @@ dotcmd(int argc, char **argv)
                shellparam.p = argv;
        };
 
+       /* This aborts if file can't be opened, which is POSIXly correct.
+        * bash returns exitcode 1 instead.
+        */
        setinputfile(fullname, INPUT_PUSH_FILE);
        commandname = fullname;
        cmdloop(0);