about summary refs log tree commit diff
path: root/src/afl-fuzz.c
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2022-01-29 19:32:36 +0000
committerDavid CARLIER <devnexen@gmail.com>2022-01-29 19:32:36 +0000
commit1d339527bbd741bbeebb500b8d38a24dce046cdf (patch)
tree5635202ec953d9fab57696a1ecb00160f87254ff /src/afl-fuzz.c
parent707b1701c3c7ea8bf10f494a265dc40c935a1878 (diff)
downloadafl++-1d339527bbd741bbeebb500b8d38a24dce046cdf.tar.gz
afl fuzz enable getpgid on other platforms.
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r--src/afl-fuzz.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index a96dee97..9ef2669a 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -53,9 +53,7 @@ static void at_exit() {
   ptr = getenv("__AFL_TARGET_PID2");
   if (ptr && *ptr && (pid2 = atoi(ptr)) > 0) {
 
-#if defined(__linux__)
     pgrp = getpgid(pid2);
-#endif
     if (pgrp > 0) { killpg(pgrp, SIGTERM); }
     kill(pid2, SIGTERM);
 
@@ -64,9 +62,7 @@ static void at_exit() {
   ptr = getenv("__AFL_TARGET_PID1");
   if (ptr && *ptr && (pid1 = atoi(ptr)) > 0) {
 
-#if defined(__linux__)
     pgrp = getpgid(pid1);
-#endif
     if (pgrp > 0) { killpg(pgrp, SIGTERM); }
     kill(pid1, SIGTERM);
 
@@ -103,9 +99,7 @@ static void at_exit() {
 
   if (pid1 > 0) {
 
-#if defined(__linux__)
     pgrp = getpgid(pid1);
-#endif
     if (pgrp > 0) { killpg(pgrp, kill_signal); }
     kill(pid1, kill_signal);
 
@@ -113,9 +107,7 @@ static void at_exit() {
 
   if (pid2 > 0) {
 
-#if defined(__linux__)
     pgrp = getpgid(pid1);
-#endif
     if (pgrp > 0) { killpg(pgrp, kill_signal); }
     kill(pid2, kill_signal);