mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-11 17:51:32 +00:00
Setting the AFL_I_AM_THE_FORKSERVER environment variable in the begining of the forkserver child process, and unsetting it when the target is launched
This commit is contained in:
@ -1046,6 +1046,7 @@ static void __afl_start_forkserver(void) {
|
||||
/* In child process: close fds, resume execution. */
|
||||
|
||||
if (unlikely(!child_pid)) { // just to signal afl-fuzz faster
|
||||
unsetenv("AFL_I_AM_THE_FORKSERVER");
|
||||
|
||||
//(void)nice(-20);
|
||||
|
||||
|
@ -878,6 +878,8 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
|
||||
/* CHILD PROCESS */
|
||||
|
||||
setenv("AFL_I_AM_THE_FORKSERVER", "1", 0);
|
||||
|
||||
// enable terminating on sigpipe in the children
|
||||
struct sigaction sa;
|
||||
memset((char *)&sa, 0, sizeof(sa));
|
||||
|
Reference in New Issue
Block a user