mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +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
|
#else
|
||||||
host_path,
|
host_path,
|
||||||
#endif
|
#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)
|
HostProcess::HostProcess(boost::asio::io_context& io_context, Logger& logger)
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#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/local/stream_protocol.hpp>
|
||||||
#include <boost/asio/streambuf.hpp>
|
#include <boost/asio/streambuf.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
|||||||
Reference in New Issue
Block a user