You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The program will print isRunning=1 at its end, meaning that the process is still running. Pausing at that point with debugger and checking ps -ax will also show that the process is a zombie.
After some investigation, faulty code seem to be in include/boost/process/detail/child_decl.hpp:
terminate() marks _terminated = true, and wait() never calls its main logic because _exited() evaluates true.
A possible solution would be to perform a blocking wait at the end of boost::process::detail::api::terminate(), because ATM it waits with WNOHANG.
The text was updated successfully, but these errors were encountered:
theroyn
changed the title
boost::process:child::wait() on Linux ignores a zombie process
boost::process::child::wait() on Linux ignores a zombie process
Aug 19, 2021
theroyn
changed the title
boost::process::child::wait() on Linux ignores a zombie process
boost::process:: child::wait() on Linux ignores a zombie process
Aug 19, 2021
Reproducible in the following example:
output on my machine is:
The program will print
isRunning=1
at its end, meaning that the process is still running. Pausing at that point with debugger and checkingps -ax
will also show that the process is a zombie.After some investigation, faulty code seem to be in
include/boost/process/detail/child_decl.hpp
:terminate()
marks_terminated = true
, andwait()
never calls its main logic because_exited()
evaluates true.A possible solution would be to perform a blocking wait at the end of
boost::process::detail::api::terminate()
, because ATM it waits withWNOHANG
.The text was updated successfully, but these errors were encountered: