children terminate on sigpipe
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index cb4e00f..58932bc 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -251,6 +251,12 @@
}
+ // enable terminating on sigpipe in the childs
+ struct sigaction sa;
+ memset((char *)&sa, 0, sizeof(sa));
+ sa.sa_handler = SIG_DFL;
+ sigaction(SIGPIPE, &sa, NULL);
+
signal(SIGCHLD, old_sigchld_handler);
// FORKSRV_FD is for communication with AFL, we don't need it in the
// child.
@@ -371,6 +377,13 @@
if (!fsrv->fsrv_pid) {
/* CHILD PROCESS */
+
+ // enable terminating on sigpipe in the childs
+ struct sigaction sa;
+ memset((char *)&sa, 0, sizeof(sa));
+ sa.sa_handler = SIG_DFL;
+ sigaction(SIGPIPE, &sa, NULL);
+
struct rlimit r;
/* Umpf. On OpenBSD, the default fd limit for root users is set to