| 106 | Process::Data::Data() noexcept : id(-1) { } |
| 107 | |
| 108 | Process::Process(const std::function<void()>& function, std::function<void(const char*, size_t)> read_stdout, |
| 109 | std::function<void(const char*, size_t)> read_stderr, bool open_stdin, const Config& config) : |
| 110 | closed(true), read_stdout(std::move(read_stdout)), read_stderr(std::move(read_stderr)), open_stdin(open_stdin), config(config) { |
| 111 | if (config.flatpak_spawn_host) |
| 112 | throw std::invalid_argument("Cannot break out of a flatpak sandbox with this overload."); |
| 113 | open(function); |
| 114 | async_read(); |
| 115 | } |
| 116 | |
| 117 | Process::id_type Process::open(const std::function<void()>& function) noexcept { |
| 118 | if (open_stdin) |
nothing calls this directly
no outgoing calls
no test coverage detected