Facilitates the launching of child processes from unit tests.
More...
#include "test/win/win_child_process.h"
|
struct | Handles |
| Groups handles used to communicate with, observe, and manage a child process. More...
|
|
|
static bool | IsChildProcess () |
| Returns true if the current process is a child process.
|
|
template<class T> |
static void | EntryPoint () |
| Runs the child process defined by T if the current process is a child process; does not return in that case. Otherwise, returns.
|
|
static std::unique_ptr< Handles > | Launch () |
| Launches a child process and returns the Handles for that process. The process is guaranteed to be executing by the time this method returns. Returns nullptr and logs a Google Test failure in case of failure.
|
|
Facilitates the launching of child processes from unit tests.
◆ CloseReadPipe()
void crashpad::test::WinChildProcess::CloseReadPipe |
( |
| ) |
|
|
protected |
◆ CloseWritePipe()
void crashpad::test::WinChildProcess::CloseWritePipe |
( |
| ) |
|
|
protected |
Closes the write pipe.
An attempt to read from the read pipe in the parent process will indicate end-of-file. WritePipeHandle() must not be called after this.
◆ ReadPipeHandle()
FileHandle crashpad::test::WinChildProcess::ReadPipeHandle |
( |
| ) |
const |
|
protected |
Returns a handle to read from an anonymous pipe shared with the parent process.
It is an error to call this after CloseReadPipe() has been called.
- Returns
- The read pipe's file handle.
◆ WritePipeHandle()
FileHandle crashpad::test::WinChildProcess::WritePipeHandle |
( |
| ) |
const |
|
protected |
Returns a handle to write to an anonymous pipe shared with the parent process.
It is an error to call this after CloseWritePipe() has been called.
- Returns
- The write pipe's file handle.
The documentation for this class was generated from the following files:
- test/win/win_child_process.h
- test/win/win_child_process.cc