aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-24 07:50:48 +0000
committerChris Lattner <sabre@nondot.org>2004-07-24 07:50:48 +0000
commit2731ead702b8f3d2f38531f1c36bc49aa15cb8db (patch)
treee76d8a330ab94a7993956782792ebddb68951e1a /llvm/lib/Support/SystemUtils.cpp
parent8171b14fccb1123922e87bf78e9eb96d6d85f84c (diff)
downloadllvm-2731ead702b8f3d2f38531f1c36bc49aa15cb8db.zip
llvm-2731ead702b8f3d2f38531f1c36bc49aa15cb8db.tar.gz
llvm-2731ead702b8f3d2f38531f1c36bc49aa15cb8db.tar.bz2
Get rid of the printout from the low-level system interface
llvm-svn: 15161
Diffstat (limited to 'llvm/lib/Support/SystemUtils.cpp')
-rw-r--r--llvm/lib/Support/SystemUtils.cpp37
1 files changed, 13 insertions, 24 deletions
diff --git a/llvm/lib/Support/SystemUtils.cpp b/llvm/lib/Support/SystemUtils.cpp
index f232d61..354f1a3 100644
--- a/llvm/lib/Support/SystemUtils.cpp
+++ b/llvm/lib/Support/SystemUtils.cpp
@@ -182,34 +182,23 @@ int llvm::RunProgramWithTimeout(const std::string &ProgramPath,
alarm(NumSeconds);
int Status;
- while (wait(&Status) != Child) {
+ while (wait(&Status) != Child)
if (errno == EINTR) {
if (Timeout) {
- static bool FirstTimeout = true;
- if (FirstTimeout) {
- std::cout <<
- "*** Program execution timed out! This mechanism is designed to handle\n"
- " programs stuck in infinite loops gracefully. The -timeout option\n"
- " can be used to change the timeout threshold or disable it completely\n"
- " (with -timeout=0). This message is only displayed once.\n";
- FirstTimeout = false;
- }
+ // Kill the child.
+ kill(Child, SIGKILL);
+
+ if (wait(&Status) != Child)
+ std::cerr << "Something funny happened waiting for the child!\n";
+
+ alarm(0);
+ sigaction(SIGALRM, &Old, 0);
+ return -1; // Timeout detected
+ } else {
+ std::cerr << "Error waiting for child process!\n";
+ exit(1);
}
-
- // Kill the child.
- kill(Child, SIGKILL);
-
- if (wait(&Status) != Child)
- std::cerr << "Something funny happened waiting for the child!\n";
-
- alarm(0);
- sigaction(SIGALRM, &Old, 0);
- return -1; // Timeout detected
- } else {
- std::cerr << "Error waiting for child process!\n";
- exit(1);
}
- }
alarm(0);
sigaction(SIGALRM, &Old, 0);