diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-08-09 14:48:06 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-08-09 16:05:46 +0200 |
| commit | 3a2fe60529aff48ba86c979157df9c1a7eefd658 (patch) | |
| tree | a1aa085af769e963399a09479bcbf1751476e4f7 /executor/common_linux.h | |
| parent | 922e8e27343704155b81f50ddd3316ec04c9d299 (diff) | |
executor: fix cgroups
1. Create per-proc cgroup in executor.
2. Setup cgroups after chdir into test dir
(it assumes relative paths against test dir).
3. Add test.
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 9c1f5d776..e491c1f94 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -1969,8 +1969,7 @@ static void kill_and_wait(int pid, int* status) #define SYZ_HAVE_SETUP_LOOP 1 static void setup_loop() { -// TODO(dvyukov): this needs SYZ_EXECUTOR and a test. -#if SYZ_ENABLE_CGROUPS +#if SYZ_EXECUTOR || SYZ_ENABLE_CGROUPS int pid = getpid(); char cgroupdir[64]; char procs_file[128]; |
