From 3d4f1b3695f8fc6c8feed2f0f7c01879554151b8 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Mon, 4 Feb 2008 20:57:54 +0000 Subject: Set error message. Patch by Shantonu Sen. llvm-svn: 46715 --- llvm/lib/System/Unix/Program.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/System/Unix') diff --git a/llvm/lib/System/Unix/Program.inc b/llvm/lib/System/Unix/Program.inc index 033a8a45947..91baefb3294 100644 --- a/llvm/lib/System/Unix/Program.inc +++ b/llvm/lib/System/Unix/Program.inc @@ -242,9 +242,11 @@ Program::ExecuteAndWait(const Path& path, // Wait for child to die if (wait(&status) != child) MakeErrMsg(ErrMsg, "Child timed out but wouldn't die"); - + else + MakeErrMsg(ErrMsg, "Child timed out", 0); + return -1; // Timeout detected - } else { + } else if (errno != EINTR) { MakeErrMsg(ErrMsg, "Error waiting for child process"); return -1; } -- cgit v1.2.3