[libc] Make more of the libc unit testing llvm independent

(WIP, hopefully I'll add more to this patch before submitting)

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D91665
This commit is contained in:
Michael Jones
2020-11-17 23:47:19 +00:00
parent 3e18fb3390
commit 8a4ee3550b
5 changed files with 30 additions and 20 deletions

View File

@@ -7,9 +7,10 @@
//===----------------------------------------------------------------------===//
#include "ExecuteFunction.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <memory>
#include <poll.h>
#include <signal.h>
@@ -41,8 +42,8 @@ ProcessStatus invokeInSubprocess(FunctionCaller *Func, unsigned timeoutMS) {
return ProcessStatus::Error("pipe(2) failed");
// Don't copy the buffers into the child process and print twice.
llvm::outs().flush();
llvm::errs().flush();
std::cout.flush();
std::cerr.flush();
pid_t Pid = ::fork();
if (Pid == -1)
return ProcessStatus::Error("fork(2) failed");