about summary refs log tree commit diff
path: root/src/afl-tmin.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2022-10-24 20:01:36 +0200
committerGitHub <noreply@github.com>2022-10-24 20:01:36 +0200
commit02502c1a543b2150bec78fbac2f0fcf1f4cd7a5a (patch)
tree690fe65fc6663cbd80711f89882d67643210692d /src/afl-tmin.c
parente9ecfed81dfd57f557a0e91d4f8ac106cfe867a2 (diff)
parent2cbe49c6eb9fa3514289a088e68c847949d9d4cc (diff)
downloadafl++-02502c1a543b2150bec78fbac2f0fcf1f4cd7a5a.tar.gz
Merge pull request #1563 from nbars/stable
Fix child reaping on fuzzer termination
Diffstat (limited to 'src/afl-tmin.c')
-rw-r--r--src/afl-tmin.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/afl-tmin.c b/src/afl-tmin.c
index 694c9c21..b346f65c 100644
--- a/src/afl-tmin.c
+++ b/src/afl-tmin.c
@@ -113,7 +113,7 @@ static void kill_child() {
 
   if (fsrv->child_pid > 0) {
 
-    kill(fsrv->child_pid, fsrv->kill_signal);
+    kill(fsrv->child_pid, fsrv->child_kill_signal);
     fsrv->child_pid = -1;
 
   }
@@ -881,6 +881,9 @@ static void usage(u8 *argv0) {
       "AFL_CRASH_EXITCODE: optional child exit code to be interpreted as crash\n"
       "AFL_FORKSRV_INIT_TMOUT: time spent waiting for forkserver during startup (in milliseconds)\n"
       "AFL_KILL_SIGNAL: Signal ID delivered to child processes on timeout, etc. (default: SIGKILL)\n"
+      "AFL_FORK_SERVER_KILL_SIGNAL: Signal delivered to fork server processes on termination\n"
+      "                             (default: SIGTERM). If this is not set and AFL_KILL_SIGNAL is set,\n"
+      "                             this will be set to the same value as AFL_KILL_SIGNAL.\n"
       "AFL_MAP_SIZE: the shared memory size for that target. must be >= the size\n"
       "              the target was compiled for\n"
       "AFL_PRELOAD:  LD_PRELOAD / DYLD_INSERT_LIBRARIES settings for target\n"
@@ -1195,8 +1198,8 @@ int main(int argc, char **argv_orig, char **envp) {
 
   }
 
-  fsrv->kill_signal =
-      parse_afl_kill_signal_env(getenv("AFL_KILL_SIGNAL"), SIGKILL);
+  configure_afl_kill_signals(fsrv, NULL, NULL);
+
 
   if (getenv("AFL_CRASH_EXITCODE")) {
 
@@ -1351,4 +1354,3 @@ int main(int argc, char **argv_orig, char **envp) {
   exit(0);
 
 }
-