aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'executor/common.h')
-rw-r--r--executor/common.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/executor/common.h b/executor/common.h
index a38768536..123723e5a 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -613,7 +613,8 @@ static void loop(void)
#endif
#if SYZ_EXECUTOR
// Tell parent that we are ready to serve.
- reply_execute(0);
+ if (!flag_snapshot)
+ reply_execute(0);
#endif
int iter = 0;
#if SYZ_REPEAT_TIMES
@@ -632,7 +633,8 @@ static void loop(void)
reset_loop();
#endif
#if SYZ_EXECUTOR
- receive_execute();
+ if (!flag_snapshot)
+ receive_execute();
#endif
int pid = fork();
if (pid < 0)
@@ -663,6 +665,11 @@ static void loop(void)
}
debug("spawned worker pid %d\n", pid);
+#if SYZ_EXECUTOR
+ if (flag_snapshot)
+ SnapshotPrepareParent();
+#endif
+
// We used to use sigtimedwait(SIGCHLD) to wait for the subprocess.
// But SIGCHLD is also delivered when a process stops/continues,
// so it would require a loop with status analysis and timeout recalculation.