diff options
author | philwo <philwo@google.com> | 2017-05-17 20:36:58 +0200 |
---|---|---|
committer | Dmitry Lomov <dslomov@google.com> | 2017-05-19 15:07:48 +0200 |
commit | 67cea8f01e93b9723c8acfcd8ef9f83a7f025088 (patch) | |
tree | f189598ba57176e71136b154a0ab73e892ca8dc1 /src/main/tools/process-tools.cc | |
parent | d922e651f75ede33a47a4b5da3be0188a94aa897 (diff) |
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
Diffstat (limited to 'src/main/tools/process-tools.cc')
-rw-r--r-- | src/main/tools/process-tools.cc | 6 |
1 files changed, 1 insertions, 5 deletions
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 <sys/wait.h> #include <unistd.h> -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); |