fix defunc spawned

This commit is contained in:
teldra 2019-12-19 19:17:28 +01:00
parent dfa8037312
commit 7ea15ce502
1 changed files with 2 additions and 3 deletions

View File

@ -247,12 +247,11 @@ fn main() {
unseen[i] = num_unseen;
let output_path = ::std::env::args().nth(1).unwrap();
let commands = ::std::env::args().nth(2).unwrap();
let the_output = Command::new("sh").arg("-c").arg(&commands).output()
.ok().expect("Failed to execute.");
let mut file = std::fs::File::create(&output_path).expect("create failed");
file.write_all(num_unseen.to_string().as_bytes()).expect(
"write failed",
);
Command::new("sh").arg("-c").arg(&commands).spawn().expect(
"command failed to start",
);
}
}