Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
subprocess.h File Reference
#include <util/syserror.h>
#include <algorithm>
#include <cassert>
#include <csignal>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <exception>
#include <future>
#include <initializer_list>
#include <iostream>
#include <locale>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include <sys/wait.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
Include dependency graph for subprocess.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  subprocess::CalledProcessError
class  subprocess::OSError
struct  subprocess::string_arg
struct  subprocess::executable
struct  subprocess::input
struct  subprocess::output
struct  subprocess::error
class  subprocess::Buffer
struct  subprocess::detail::ArgumentDeducer
class  subprocess::detail::Child
class  subprocess::detail::Communication
class  subprocess::detail::Streams
class  subprocess::Popen

Namespaces

namespace  subprocess
namespace  subprocess::util
namespace  subprocess::detail

Macros

#define subprocess_close   close
#define subprocess_fileno   fileno
#define subprocess_open   open
#define subprocess_write   write

Typedefs

using subprocess::OutBuffer = Buffer
using subprocess::ErrBuffer = Buffer

Enumerations

enum  subprocess::IOTYPE { subprocess::STDOUT = 1 , subprocess::STDERR , subprocess::PIPE }

Functions

static std::vector< std::string > subprocess::util::split (const std::string &str, const std::string &delims=" \t")
static void subprocess::util::set_clo_on_exec (int fd, bool set=true)
static std::pair< int, int > subprocess::util::pipe_cloexec () noexcept(false)
static int subprocess::util::write_n (int fd, const char *buf, size_t length)
static int subprocess::util::read_atmost_n (FILE *fp, char *buf, size_t read_upto)
static int subprocess::util::read_all (FILE *fp, std::vector< char > &buf)
static std::pair< int, int > subprocess::util::wait_for_child_exit (int pid)

Variables

static const size_t subprocess::SP_MAX_ERR_BUF_SIZ = 1024
static const size_t subprocess::DEFAULT_BUF_CAP_BYTES = 8192

Macro Definition Documentation

◆ subprocess_close

#define subprocess_close   close

Documentation for C++ subprocessing library.

Author
[Arun Muralidharan]
See also
https://github.com/arun11299/cpp-subprocess to download the source code
Version
1.0.0

Definition at line 86 of file subprocess.h.

◆ subprocess_fileno

#define subprocess_fileno   fileno

Definition at line 87 of file subprocess.h.

◆ subprocess_open

#define subprocess_open   open

Definition at line 88 of file subprocess.h.

◆ subprocess_write

#define subprocess_write   write

Definition at line 89 of file subprocess.h.