about summary refs log tree commit diff
path: root/src/afl-fuzz.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-fuzz.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-fuzz.c')
-rw-r--r--src/afl-fuzz.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index d116822a..d8d804ae 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -25,6 +25,7 @@
 
 #include "afl-fuzz.h"
 #include "cmplog.h"
+#include "common.h"
 #include <limits.h>
 #include <stdlib.h>
 #ifndef USEMMAP
@@ -261,6 +262,9 @@ static void usage(u8 *argv0, int more_help) {
       "AFL_INPUT_LEN_MIN/AFL_INPUT_LEN_MAX: like -g/-G set min/max fuzz length produced\n"
       "AFL_PIZZA_MODE: 1 - enforce pizza mode, 0 - disable for April 1st\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.\n"
       "AFL_MAP_SIZE: the shared memory size for that target. must be >= the size\n"
       "              the target was compiled for\n"
       "AFL_MAX_DET_EXTRAS: if more entries are in the dictionary list than this value\n"
@@ -1358,8 +1362,9 @@ int main(int argc, char **argv_orig, char **envp) {
 
   #endif
 
-  afl->fsrv.kill_signal =
-      parse_afl_kill_signal_env(afl->afl_env.afl_kill_signal, SIGKILL);
+  configure_afl_kill_signals(&afl->fsrv,
+    afl->afl_env.afl_child_kill_signal,
+    afl->afl_env.afl_fsrv_kill_signal);
 
   setup_signal_handlers();
   check_asan_opts(afl);
@@ -2683,4 +2688,3 @@ stop_fuzzing:
 }
 
 #endif                                                          /* !AFL_LIB */
-