v2.0.0-beta.6
Pre-releaseBreaking Changes
-
Removed
reproc_stop
and replaced it withreproc_wait
,reproc_terminate
andreproc_kill
.Because C doesn't support function overloading I was unable to find a satisfactory design to stop a child process in a configurable way using a single function (
reproc_stop
). By splitting back into separate functions simple use cases don't have to specify unnecessary arguments and complicated use cases still have full control over how they want to stop a child process.reproc++ now also exposes separate
process::wait
,process::terminate
andprocess::kill
methods in the process class that directly map to the corresponding reproc functions. However, because C++ does support overloaded functions and methods, reproc++ still providesprocess::stop
which simplifies calling combinations ofprocess::wait
,process::terminate
andprocess::kill
. It now takes its arguments differently. Check the examples or theprocess::stop
documentation for more info. Theprocess
constructor has been updated to take its arguments the same way. -
Changed
process
destructor to wait indefinitely for the child process to exit instead of only checking if the child process is still running.reproc++ should promote correct cleanup of child processes. The previous defaults might cause users to accidentally not correctly clean up child processes. By changing the defaults to wait indefinitely, users will immediately know the child process isn't exiting for some reason which they can then solve by adding more options to the constructor.