Crashpad
|
Facilitates the launching of child processes from unit tests. More...
#include "test/win/win_child_process.h"
Classes | |
struct | Handles |
Groups handles used to communicate with, observe, and manage a child process. More... | |
Static Public Member Functions | |
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 null and logs a GTest failure in case of failure. | |
Protected Member Functions | |
FileHandle | ReadPipeHandle () const |
Returns a handle to read from an anonymous pipe shared with the parent process. More... | |
FileHandle | WritePipeHandle () const |
Returns a handle to write to an anonymous pipe shared with the parent process. More... | |
void | CloseReadPipe () |
Closes the read pipe. More... | |
void | CloseWritePipe () |
Closes the write pipe. More... | |
Facilitates the launching of child processes from unit tests.
|
protected |
Closes the read pipe.
ReadPipeHandle() must not be called after this.
|
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.
|
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.
|
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.