From 67cea8f01e93b9723c8acfcd8ef9f83a7f025088 Mon Sep 17 00:00:00 2001 From: philwo Date: Wed, 17 May 2017 20:36:58 +0200 Subject: Some fixes to process-wrapper / linux-sandbox. - Refactoring to share more code between the two programs. - Remove setuid() call in linux-sandbox. It was added due to a wrong understanding of what process-wrapper did in the beginning and unless someone installed linux-sandbox as a setuid binary, it was a no-op. - Switch to a new process group in linux-sandbox to avoid accidentally killing our parent. RELNOTES: None. PiperOrigin-RevId: 156332503 --- src/main/tools/process-tools.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/main/tools/process-tools.cc') diff --git a/src/main/tools/process-tools.cc b/src/main/tools/process-tools.cc index a25dbeeb1d..0c77611e25 100644 --- a/src/main/tools/process-tools.cc +++ b/src/main/tools/process-tools.cc @@ -27,7 +27,7 @@ #include #include -extern bool global_debug; +#include "src/main/tools/logging.h" int SwitchToEuid() { int uid = getuid(); @@ -143,10 +143,6 @@ void ClearSignalMask() { } void SetTimeout(double timeout_secs) { - if (timeout_secs <= 0) { - return; - } - double int_val, fraction_val; fraction_val = modf(timeout_secs, &int_val); -- cgit v1.2.3