-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(process): avoid leaking zombies and fds in detached processes #3379
Conversation
@@ -241,22 +241,24 @@ namespace platf { | |||
|
|||
bp::child | |||
run_command(bool elevated, bool interactive, const std::string &cmd, boost::filesystem::path &working_dir, const bp::environment &env, FILE *file, std::error_code &ec, bp::group *group) { | |||
// clang-format off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format gets confused by the boost::process
syntax and thinks bp::std_in
is a template class bp::std_in<bp::null, bp::std_out>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3379 +/- ##
==========================================
- Coverage 11.11% 11.05% -0.06%
==========================================
Files 75 99 +24
Lines 13204 17237 +4033
Branches 6084 8036 +1952
==========================================
+ Hits 1467 1905 +438
- Misses 9307 12783 +3476
- Partials 2430 2549 +119
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Quality Gate passedIssues Measures |
Description
We were leaking detached child processes on Mac and Linux because we are expected to still wait on those with
waitpid()
in order to reap their entry in the process table. We will now do that whenproc_t::running()
is called (which happens regularly while streaming and periodically when clients poll for server info). This isn't a perfect solution but it's much better than the current situation today where all detached processes become zombies.We were also leaking file descriptors into detached processes which could cause our log files and sockets to persist longer than expected.
Screenshot
Issues Fixed or Closed
Fixes #3378
Type of Change
.github/...
)Checklist