This commit is contained in:
2024-05-03 18:47:37 +08:00
parent ad78dad7c7
commit c1b00bb9f1
5 changed files with 77 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ namespace hpcstat
process = std::make_unique<bp::child>
(program.string(), bp::args(args), bp::std_out > output, bp::std_err > stderr, bp::std_in < input);
input << *stdin;
input.close();
input.pipe().close();
}
else process = std::make_unique<bp::child>
(program.string(), bp::args(args), bp::std_out > output, bp::std_err > stderr, bp::std_in < bp::null);