From 0addd1aca47ed887929a19ac2eb66a9107b3c699 Mon Sep 17 00:00:00 2001 From: gvbr <41351562+gvbr@users.noreply.github.com> Date: Tue, 17 Jul 2018 20:06:18 -0700 Subject: [PATCH] Runahead: ensure prefixed second-instance temp directory on linux --- runahead/secondary_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runahead/secondary_core.c b/runahead/secondary_core.c index 74ce5ccc4b..9d0d67de4b 100644 --- a/runahead/secondary_core.c +++ b/runahead/secondary_core.c @@ -80,7 +80,11 @@ char* get_temp_directory_alloc(void) return path; #endif #else - char *path = strcpy_alloc_force(getenv("TMPDIR")); + char *path = "/tmp"; + if (getenv("TMPDIR")) + path = getenv("TMPDIR"); + + path = strcpy_alloc_force(path); return path; #endif }