We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abd8efa commit c8c5d89Copy full SHA for c8c5d89
libafl/src/executors/command.rs
@@ -135,8 +135,15 @@ impl CommandConfigurator for StdCommandConfigurator {
135
self.command.stdin(Stdio::piped()).spawn()?;
136
let mut handle = self.command.spawn()?;
137
let mut stdin = handle.stdin.take().unwrap();
138
- stdin.write_all(input.target_bytes().as_slice())?;
139
- stdin.flush()?;
+ if let Err(err) = stdin.write_all(input.target_bytes().as_slice()) {
+ if err.kind() != std::io::ErrorKind::BrokenPipe {
140
+ return Err(err.into());
141
+ }
142
+ } else if let Err(err) = stdin.flush() {
143
144
145
146
147
drop(stdin);
148
Ok(handle)
149
}
0 commit comments