github DaanDeMeyer/reproc v2.0.0-beta.6

latest releases: v14.2.5, v14.2.4, v14.2.3...
pre-release5 years ago

Breaking Changes

  • Removed reproc_stop and replaced it with reproc_wait, reproc_terminate and reproc_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 and process::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 provides process::stop which simplifies calling combinations of process::wait, process::terminate and process::kill. It now takes its arguments differently. Check the examples or the process::stop documentation for more info. The process 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.

Don't miss a new reproc release

NewReleases is sending notifications on new releases.