Add Process functions for detached spawning

This commit is contained in:
Robbert van der Helm
2022-04-14 16:39:34 +02:00
parent 1df7abfb2c
commit 75b3cf266d
5 changed files with 152 additions and 16 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ StdIoCapture::StdIoCapture(asio::io_context& io_context, int file_descriptor)
original_fd_copy_(dup(file_descriptor)) {
// We'll use the second element of these two file descriptors to reopen
// `file_descriptor`, and the first one to read the captured contents from
if (::pipe(pipe_fd_) != 0) {
if (pipe(pipe_fd_) != 0) {
std::cerr << "Could not create pipe" << std::endl;
throw std::system_error(errno, std::system_category());
}