#include <Popen.hh>
Remember how to use popen.
Definition at line 13 of file Popen.hh.
◆ Popen()
◆ default_pclose_handler()
void CASM::Popen::default_pclose_handler |
( |
int |
status | ) |
|
|
static |
Default pclose error handler throws std::runtime_error if pclose failed.
Definition at line 63 of file Popen.cc.
◆ default_popen_handler()
void CASM::Popen::default_popen_handler |
( |
FILE * |
fp | ) |
|
|
static |
Default popen error handler throws std::runtime_error if popen failed.
Definition at line 55 of file Popen.cc.
◆ exit_code()
int CASM::Popen::exit_code |
( |
| ) |
const |
Returns pclose(fp)/256.
Definition at line 52 of file Popen.cc.
◆ gets()
std::string CASM::Popen::gets |
( |
| ) |
const |
Returns the stdout resulting from the last popen call.
Definition at line 43 of file Popen.cc.
◆ popen()
void CASM::Popen::popen |
( |
std::string |
_command | ) |
|
Execute popen for a given command.
- Uses provide error handlers
- Stores popen stdout, which can be accessed using gets
Definition at line 19 of file Popen.cc.
◆ print()
void CASM::Popen::print |
( |
std::ostream & |
sout | ) |
const |
Print the last command executed and the resulting stdout.
Definition at line 46 of file Popen.cc.
◆ m_combine_stdout_stderr
bool CASM::Popen::m_combine_stdout_stderr |
|
private |
◆ m_command
std::string CASM::Popen::m_command |
|
private |
◆ m_pclose_handler
std::function<void(int)> CASM::Popen::m_pclose_handler |
|
private |
◆ m_pclose_result
int CASM::Popen::m_pclose_result |
|
private |
◆ m_popen_handler
std::function<void(FILE *)> CASM::Popen::m_popen_handler |
|
private |
◆ m_stdout
std::string CASM::Popen::m_stdout |
|
private |
The documentation for this class was generated from the following files:
- /Users/bpuchala/Work/codes/CASMcode_v0.2.X_reference/include/casm/system/Popen.hh
- /Users/bpuchala/Work/codes/CASMcode_v0.2.X_reference/src/casm/system/Popen.cc