Make Program::Wait differentiate execution failure due to the file
being not found from the file being not executable. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117664 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/System/Program.cpp b/lib/System/Program.cpp
index cd58c2c..90aba76 100644
--- a/lib/System/Program.cpp
+++ b/lib/System/Program.cpp
@@ -31,7 +31,7 @@
                         std::string* ErrMsg) {
   Program prg;
   if (prg.Execute(path, args, envp, redirects, memoryLimit, ErrMsg))
-    return prg.Wait(secondsToWait, ErrMsg);
+    return prg.Wait(path, secondsToWait, ErrMsg);
   else
     return -1;
 }