#include <subprocess.hpp>
◆ Subprocess() [1/3]
asmgrader::Subprocess::Subprocess |
( |
std::string | exec, |
|
|
std::vector< std::string > | args ) |
|
explicit |
Creates a sub (child) process by running exec
with args
ENV variables remain as default for for the child process.
◆ ~Subprocess()
asmgrader::Subprocess::~Subprocess |
( |
| ) |
|
|
virtual |
◆ Subprocess() [2/3]
asmgrader::Subprocess::Subprocess |
( |
Subprocess && | other | ) |
|
|
noexcept |
◆ Subprocess() [3/3]
asmgrader::Subprocess::Subprocess |
( |
| ) |
|
|
protecteddefault |
◆ close_pipes()
Result< void > asmgrader::Subprocess::close_pipes |
( |
| ) |
|
Close stdout and stdin pipes to child Useful for when the child is blocking on a read to stdin.
◆ create()
Result< void > asmgrader::Subprocess::create |
( |
const std::string & | exec, |
|
|
const std::vector< std::string > & | args ) |
|
protectedvirtual |
◆ get_exit_code()
std::optional< int > asmgrader::Subprocess::get_exit_code |
( |
| ) |
const |
|
inline |
◆ get_full_stdout()
const std::string & asmgrader::Subprocess::get_full_stdout |
( |
| ) |
|
Get all stdout since the program has launched.
◆ get_pid()
pid_t asmgrader::Subprocess::get_pid |
( |
| ) |
const |
|
inline |
◆ init_child()
Result< void > asmgrader::Subprocess::init_child |
( |
| ) |
|
|
protectedvirtual |
◆ init_parent()
Result< void > asmgrader::Subprocess::init_parent |
( |
| ) |
|
|
protectedvirtual |
◆ is_alive()
bool asmgrader::Subprocess::is_alive |
( |
| ) |
const |
Whether child process is alive.
◆ kill()
Result< void > asmgrader::Subprocess::kill |
( |
| ) |
|
|
virtual |
Manually kill subprocess with SIGKILL.
◆ operator=()
◆ read_stdout() [1/2]
Result< std::string > asmgrader::Subprocess::read_stdout |
( |
| ) |
|
◆ read_stdout() [2/2]
template<typename Rep , typename Period >
Result< std::string > asmgrader::Subprocess::read_stdout |
( |
const std::chrono::duration< Rep, Period > & | timeout | ) |
|
|
inline |
◆ restart()
Result< void > asmgrader::Subprocess::restart |
( |
| ) |
|
|
virtual |
◆ send_stdin()
Result< void > asmgrader::Subprocess::send_stdin |
( |
const std::string & | str | ) |
|
◆ start()
Result< void > asmgrader::Subprocess::start |
( |
| ) |
|
|
virtual |
◆ wait_for_exit() [1/2]
int asmgrader::Subprocess::wait_for_exit |
( |
| ) |
|
◆ wait_for_exit() [2/2]
Result< int > asmgrader::Subprocess::wait_for_exit |
( |
std::chrono::microseconds | timeout | ) |
|
|
virtual |
The documentation for this class was generated from the following files: