Use vfork() for spawning processes #45

This commit is contained in:
Robbert van der Helm
2020-10-21 22:30:50 +02:00
parent 3facdf532a
commit ce385f39d3
2 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -45,7 +45,10 @@ bp::child launch_host(fs::path host_path, Args&&... args) {
#else
host_path,
#endif
std::forward<Args>(args)...);
// We'll use vfork() instead of fork to avoid potential issues with
// inheriting file descriptors
// https://github.com/robbert-vdh/yabridge/issues/45
bp::posix::use_vfork, std::forward<Args>(args)...);
}
HostProcess::HostProcess(boost::asio::io_context& io_context, Logger& logger)