MySQL 8.0.40
Source Code Documentation
|
Runs a specified command line and calls a callback for all data that is written by the child program to its standard output. More...
Public Member Functions | |
Process (std::string cmd_line, TCallback &&input_handler, DWORD pipe_size) | |
~Process () | |
double | get_cpu_time () const |
Private Member Functions | |
void | create_pipe (DWORD pipe_size) |
Creates a big pipe that will receive and buffer data coming from the child process. More... | |
void | create_process (std::string cmd_line) |
Runs the actual child process. More... | |
void | read_output (TCallback &&input_handler) |
Reads the child results until the pipe is not closed. More... | |
Private Attributes | |
HANDLE | m_stdout_read_pipe = INVALID_HANDLE_VALUE |
HANDLE | m_stdout_write_pipe = INVALID_HANDLE_VALUE |
HANDLE | m_process_handle = INVALID_HANDLE_VALUE |
Runs a specified command line and calls a callback for all data that is written by the child program to its standard output.
The standard error is redirected to parent standard error stream. There is no input stream redirected.
Process< TCallback >::Process | ( | std::string | cmd_line, |
TCallback && | input_handler, | ||
DWORD | pipe_size | ||
) |
|
private |
Creates a big pipe that will receive and buffer data coming from the child process.
|
private |
Runs the actual child process.
double Process< TCallback >::get_cpu_time |
|
private |
Reads the child results until the pipe is not closed.
Runs callback for all received data.
|
private |
|
private |
|
private |