mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Use vfork() for spawning processes #45
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// Bosot.Process's auto detection for vfork() support doesn't seem to work
|
||||
#define BOOST_POSIX_HAS_VFORK 1
|
||||
|
||||
#include <boost/asio/local/stream_protocol.hpp>
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
Reference in New Issue
Block a user