5#ifndef BITCOIN_IPC_PROCESS_H
6#define BITCOIN_IPC_PROCESS_H
29 virtual std::tuple<mp::ProcessId, mp::SocketId>
spawn(
const std::string& new_exe_name,
const fs::path& argv0_path) = 0;
37 virtual std::optional<mp::SocketId>
checkSpawned(
int argc,
char* argv[]) = 0;
41 const std::string& dest_exe_name,
42 std::string& address) = 0;
46 const std::string& exe_name,
47 std::string& address) = 0;
IPC process interface for spawning bitcoin processes and serving requests in processes that have been...
virtual mp::SocketId connect(const fs::path &data_dir, const std::string &dest_exe_name, std::string &address)=0
Canonicalize and connect to address, returning socket id.
virtual ~Process()=default
virtual mp::SocketId bind(const fs::path &data_dir, const std::string &exe_name, std::string &address)=0
Create listening socket, bind and canonicalize address, and return socket id.
virtual int waitSpawned(mp::ProcessId pid)=0
Wait for spawned process to exit and return its exit code.
virtual std::tuple< mp::ProcessId, mp::SocketId > spawn(const std::string &new_exe_name, const fs::path &argv0_path)=0
Spawn process and return socket id for communicating with it.
virtual std::optional< mp::SocketId > checkSpawned(int argc, char *argv[])=0
Parse command line and determine if current process is a spawned child process.
std::unique_ptr< Process > MakeProcess()
Constructor for Process interface.