| 34 | { |
| 35 | } |
| 36 | std::unique_ptr<interfaces::Init> spawnProcess(const char* new_exe_name) override |
| 37 | { |
| 38 | int pid; |
| 39 | int fd = m_process->spawn(new_exe_name, m_process_argv0, pid); |
| 40 | LogPrint(::BCLog::IPC, "Process %s pid %i launched\n", new_exe_name, pid); |
| 41 | auto init = m_protocol->connect(fd, m_exe_name); |
| 42 | Ipc::addCleanup(*init, [this, new_exe_name, pid] { |
| 43 | int status = m_process->waitSpawned(pid); |
| 44 | LogPrint(::BCLog::IPC, "Process %s pid %i exited with status %i\n", new_exe_name, pid, status); |
| 45 | }); |
| 46 | return init; |
| 47 | } |
| 48 | bool startSpawnedProcess(int argc, char* argv[], int& exit_status) override |
| 49 | { |
| 50 | exit_status = EXIT_FAILURE; |
no test coverage detected