Crashpad

Classes | Static Public Member Functions | Protected Member Functions | List of all members
crashpad::test::WinChildProcess Class Referenceabstract

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...

## Detailed Description

Facilitates the launching of child processes from unit tests.

## Member Function Documentation

## ◆ CloseReadPipe()

void crashpad::test::WinChildProcess::CloseReadPipe | ( |  | ) |
| protected

Closes the read pipe.

ReadPipeHandle() must not be called after this.

## ◆ 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