[llvm-commits] CVS: llvm/lib/Support/SystemUtils.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 16 00:36:01 PDT 2004


Changes in directory llvm/lib/Support:

SystemUtils.cpp updated: 1.23 -> 1.24

---
Log message:

Bugpoint was not correctly capturing stderr!  This caused it to "find" bugs
that didn't exist, missing the ones that do :(


---
Diffs of the changes:  (+4 -1)

Index: llvm/lib/Support/SystemUtils.cpp
diff -u llvm/lib/Support/SystemUtils.cpp:1.23 llvm/lib/Support/SystemUtils.cpp:1.24
--- llvm/lib/Support/SystemUtils.cpp:1.23	Fri Apr  2 15:26:04 2004
+++ llvm/lib/Support/SystemUtils.cpp	Fri Apr 16 00:35:58 2004
@@ -142,7 +142,10 @@
   case 0:               // Child
     RedirectFD(StdInFile, 0);      // Redirect file descriptors...
     RedirectFD(StdOutFile, 1);
-    RedirectFD(StdErrFile, 2);
+    if (StdOutFile != StdErrFile)
+      RedirectFD(StdErrFile, 2);
+    else
+      dup2(1, 2);
 
     execv(ProgramPath.c_str(), (char *const *)Args);
     std::cerr << "Error executing program: '" << ProgramPath;





More information about the llvm-commits mailing list