Skip to content

Commit

Permalink
run_command: Enable close_fds option to avoid lingering fds
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed Aug 29, 2024
1 parent abf6b94 commit 1e6b0f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/run_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1e6b0f3

Please sign in to comment.