From 9f91e1cb28cb4634c56b7da645da5e4d022a7be8 Mon Sep 17 00:00:00 2001 From: toole1 <toole1@6fbd10e7-183d-0410-a318-cb416676e4f2> Date: Sat, 23 Jul 2011 06:04:01 +0000 Subject: [PATCH] or this git-svn-id: https://subversion.cs.illinois.edu/svn/cs225@3378 6fbd10e7-183d-0410-a318-cb416676e4f2 --- proxy.cpp | 5 +++++ proxy.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/proxy.cpp b/proxy.cpp index ab25777..4c6ee3f 100755 --- a/proxy.cpp +++ b/proxy.cpp @@ -462,7 +462,12 @@ bool UnitTestContainer::execute(bool enable_valgrind_call) { cout << std::flush; test_execution executor(test, environment, enable_valgrind_call); + return fork_execute(executor); +} +template <typename F> +bool fork_execute(F & executor) +{ // Fork pid_t process_id; process_id = fork(); diff --git a/proxy.h b/proxy.h index 2ae7223..15320b4 100755 --- a/proxy.h +++ b/proxy.h @@ -125,6 +125,9 @@ namespace proxy UnitTestContainer(const UnitTestContainer & other); UnitTestContainer & operator=(const UnitTestContainer & other); }; + + template <typename F> + bool fork_execute(F & executor); class test_execution { -- GitLab