Skip to content

Commit a0eed55

Browse files
luke-jrlaanwj
authored andcommitted
run_command: Enable close_fds option to avoid lingering fds
1 parent c7c356a commit a0eed55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/run_command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ UniValue RunCommandParseJSON(const std::string& str_command, const std::string&
2424

2525
if (str_command.empty()) return UniValue::VNULL;
2626

27-
auto c = sp::Popen(str_command, sp::input{sp::PIPE}, sp::output{sp::PIPE}, sp::error{sp::PIPE});
27+
auto c = sp::Popen(str_command, sp::input{sp::PIPE}, sp::output{sp::PIPE}, sp::error{sp::PIPE}, sp::close_fds{true});
2828
if (!str_std_in.empty()) {
2929
c.send(str_std_in);
3030
}

0 commit comments

Comments
 (0)