btllib
Loading...
Searching...
No Matches
btllib::ProcessPipeline Class Reference

#include <process_pipeline.hpp>

Public Member Functions

 ProcessPipeline (const std::string &cmd)
 
void close_in ()
 
void close_out ()
 
void end ()
 

Public Attributes

FILE * in = nullptr
 
FILE * out = nullptr
 
std::atomic< bool > in_closed { false }
 
std::atomic< bool > out_closed { false }
 

Detailed Description

Run a process pipeline and obtain the stdin of the first and stdout of the last process.

Constructor & Destructor Documentation

◆ ProcessPipeline()

btllib::ProcessPipeline::ProcessPipeline ( const std::string & cmd)

Runs a process or a pipeline of processes in the background.

Parameters
cmdThe command to execute and obtain stdin and stdout for. A number of commands can be chained and piped (with the | operator) in which case stdin of the first command stdout of the last command are available.

The documentation for this class was generated from the following file: