about summary refs log tree commit diff homepage
path: root/tools/klee-replay/klee-replay.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/klee-replay/klee-replay.c')
-rw-r--r--tools/klee-replay/klee-replay.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/klee-replay/klee-replay.c b/tools/klee-replay/klee-replay.c
index 33c28d22..f285ebf9 100644
--- a/tools/klee-replay/klee-replay.c
+++ b/tools/klee-replay/klee-replay.c
@@ -191,6 +191,11 @@ static void run_monitored(char *executable, int argc, char **argv) {
 #endif
 
     if (!rootdir) {
+      if (chdir(replay_dir) != 0) {
+        perror("chdir");
+        _exit(66);
+      }
+
       execv(executable, argv);
       perror("execv");
       _exit(66);