aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2017-05-18 14:26:02 +0200
committerAndrey Konovalov <andreyknvl@google.com>2017-06-12 19:48:23 +0200
commit5597911fbf26237b9d11a0f6293e4b52b2d9069c (patch)
tree9559a1e14daff7759f4ba6ef6740c6809567d081 /executor
parente7366c123e8e62cab5e70998b56e832c77178a59 (diff)
csource: use tmp dir only when necessary
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/executor/common.h b/executor/common.h
index 92467dc26..99c3fb9f3 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -175,6 +175,7 @@ static void install_segv_handler()
sigaction(SIGBUS, &sa, NULL);
}
+#if defined(SYZ_EXECUTOR) || defined(SYZ_USE_TMP_DIR)
static void use_temporary_dir()
{
char tmpdir_template[] = "./syzkaller.XXXXXX";
@@ -186,6 +187,7 @@ static void use_temporary_dir()
if (chdir(tmpdir))
fail("failed to chdir");
}
+#endif
#define NONFAILING(...) \
{ \