windows: Support LIBAFL_DEBUG_OUTPUT (#1569)
This commit is contained in:
parent
7cb1080e35
commit
652c24cb2a
@ -317,6 +317,8 @@ where
|
|||||||
|
|
||||||
log::info!("spawning on cores: {:?}", self.cores);
|
log::info!("spawning on cores: {:?}", self.cores);
|
||||||
|
|
||||||
|
let debug_output = std::env::var("LIBAFL_DEBUG_OUTPUT").is_ok();
|
||||||
|
|
||||||
//spawn clients
|
//spawn clients
|
||||||
for (id, _) in core_ids.iter().enumerate().take(num_cores) {
|
for (id, _) in core_ids.iter().enumerate().take(num_cores) {
|
||||||
if self.cores.ids.iter().any(|&x| x == id.into()) {
|
if self.cores.ids.iter().any(|&x| x == id.into()) {
|
||||||
@ -327,7 +329,13 @@ where
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::env::set_var(_AFL_LAUNCHER_CLIENT, id.to_string());
|
std::env::set_var(_AFL_LAUNCHER_CLIENT, id.to_string());
|
||||||
let child = startable_self()?.stdout(stdio).spawn()?;
|
let mut child = startable_self()?;
|
||||||
|
let child = (if debug_output {
|
||||||
|
&mut child
|
||||||
|
} else {
|
||||||
|
child.stdout(stdio)
|
||||||
|
})
|
||||||
|
.spawn()?;
|
||||||
handles.push(child);
|
handles.push(child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user