0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-01 09:35:52 -05:00

run_command: Enable close_fds option to avoid lingering fds

This commit is contained in:
Luke Dashjr 2024-08-29 20:05:50 +00:00
parent 0cb1dc0be9
commit ff198b5ce5

View file

@ -24,7 +24,7 @@ UniValue RunCommandParseJSON(const std::string& str_command, const std::string&
if (str_command.empty()) return UniValue::VNULL;
auto c = sp::Popen(str_command, sp::input{sp::PIPE}, sp::output{sp::PIPE}, sp::error{sp::PIPE});
auto c = sp::Popen(str_command, sp::input{sp::PIPE}, sp::output{sp::PIPE}, sp::error{sp::PIPE}, sp::close_fds{true});
if (!str_std_in.empty()) {
c.send(str_std_in);
}