5#ifndef BITCOIN_IPC_PROCESS_H
6#define BITCOIN_IPC_PROCESS_H
41 std::string& address) = 0;
46 std::string& address) = 0;
IPC process interface for spawning bitcoin processes and serving requests in processes that have been...
virtual bool checkSpawned(int argc, char *argv[], int &fd)=0
Parse command line and determine if current process is a spawned child process.
virtual ~Process()=default
virtual int spawn(const std::string &new_exe_name, const fs::path &argv0_path, int &pid)=0
Spawn process and return socket file descriptor for communicating with it.
virtual int connect(const fs::path &data_dir, const std::string &dest_exe_name, std::string &address)=0
Canonicalize and connect to address, returning socket descriptor.
virtual int 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 descriptor.
virtual int waitSpawned(int pid)=0
Wait for spawned process to exit and return its exit code.
std::unique_ptr< Process > MakeProcess()
Constructor for Process interface.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.