commit bash-20101015 snapshot

This commit is contained in:
Chet Ramey
2011-12-12 22:08:08 -05:00
parent aad3dfa27a
commit 048b249ea3
33 changed files with 843 additions and 122 deletions
+4 -2
View File
@@ -212,7 +212,7 @@ exec_builtin (list)
end_job_control ();
#endif /* JOB_CONTROL */
shell_execve (command, args, env);
exit_value = shell_execve (command, args, env);
/* We have to set this to NULL because shell_execve has called realloc()
to stuff more items at the front of the array, which may have caused
@@ -221,7 +221,9 @@ exec_builtin (list)
if (cleanenv == 0)
adjust_shell_level (1);
if (executable_file (command) == 0)
if (exit_value == EX_NOTFOUND) /* no duplicate error message */
goto failed_exec;
else if (executable_file (command) == 0)
{
builtin_error (_("%s: cannot execute: %s"), command, strerror (errno));
exit_value = EX_NOEXEC; /* As per Posix.2, 3.14.6 */