about summary refs log tree commit diff homepage
path: root/tools/klee-replay/klee-replay.c
diff options
context:
space:
mode:
authorGleb Popov <6yearold@gmail.com>2019-03-30 16:34:13 +0400
committerMartinNowack <martin.nowack@gmail.com>2019-04-02 09:12:56 +0100
commit7948a03c62890333ae3848b626efb9340a542beb (patch)
tree72950cfc5abbbaa62eddecc35a761e2cc449fce0 /tools/klee-replay/klee-replay.c
parent0b33d74f465991e94d8dafb6eeaf4b69af0a1887 (diff)
downloadklee-7948a03c62890333ae3848b626efb9340a542beb.tar.gz
Fix klee-replay tool on FreeBSD.
Diffstat (limited to 'tools/klee-replay/klee-replay.c')
-rw-r--r--tools/klee-replay/klee-replay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/klee-replay/klee-replay.c b/tools/klee-replay/klee-replay.c
index d26b67cd..9261535a 100644
--- a/tools/klee-replay/klee-replay.c
+++ b/tools/klee-replay/klee-replay.c
@@ -23,7 +23,7 @@
 
 #include <sys/wait.h>
 
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
 #include <signal.h>
 #define fgetc_unlocked(x) fgetc (x)
 #define fputc_unlocked(x,y) fputc (x,y)
@@ -185,7 +185,11 @@ static void run_monitored(char *executable, int argc, char **argv) {
      * do this, because later on we might want to kill pid _and_ all processes
      * spawned by it and its descendants.
      */
+#ifndef __FreeBSD__
     setpgrp();
+#else
+    setpgrp(0, 0);
+#endif
 
     if (!rootdir) {
       execv(executable, argv);