crashpad::test::WinMultiprocess Class Referenceabstract

Manages a multiprocess test on Windows. More...

`#include "test/win/win_multiprocess.h"`

Inheritance diagram for crashpad::test::WinMultiprocess:

## Static Public Member Functions

template<class T >
static void | Run ()
| Runs the test. More...

## Protected Member Functions

void | SetExpectedChildExitCode (unsigned int exit_code)
| Sets the expected exit code of the child process. More...
FileHandle | ReadPipeHandle () const
| Returns the read pipe's file handle. More...
FileHandle | WritePipeHandle () const
| Returns the write pipe's file handle. More...
void | CloseReadPipe ()
| Closes the read pipe. More...
void | CloseWritePipe ()
| Closes the write pipe. More...
HANDLE | ChildProcess () const
| Returns a handle to the child process. More...

## Detailed Description

Manages a multiprocess test on Windows.

## Member Function Documentation

## ChildProcess()

HANDLE crashpad::test::WinMultiprocess::ChildProcess | ( |  | ) | const

protected

Returns a handle to the child process.

This method may only be called by the parent process.

## CloseReadPipe()

void crashpad::test::WinMultiprocess::CloseReadPipe | ( |  | ) |

protected

Closes the read pipe.

This method may be called by either the parent or the child process. ReadPipeHandle() must not be called after this.

## CloseWritePipe()

void crashpad::test::WinMultiprocess::CloseWritePipe | ( |  | ) |

protected

Closes the write pipe.

This method may be called by either the parent or the child process. An attempt to read from the read pipe in the partner process will indicate end-of-file. WritePipeHandle() must not be called after this.

## ReadPipeHandle()

FileHandle crashpad::test::WinMultiprocess::ReadPipeHandle | ( |  | ) | const

protected

Returns the read pipe's file handle.

This method may be called by either the parent or the child process. Anything written to the write pipe in the partner process will appear on this file handle in this process.

It is an error to call this after CloseReadPipe() has been called.

Returns
  The read pipe's file handle.

## Run()

template<class T >

static void crashpad::test::WinMultiprocess::Run | ( |  | ) |

inlinestatic

Runs the test.

This method establishes the testing environment by respawning the process as a child with additional flags.

In the parent process, WinMultiprocessParent() is run, and in the child WinMultiprocessChild().

## SetExpectedChildExitCode()

void crashpad::test::WinMultiprocess::SetExpectedChildExitCode | ( | unsigned int | exit_code | ) |

protected

Sets the expected exit code of the child process.

The default expected termination code is `EXIT_SUCCESS` (`0`).

Parameters

  [in] | exit_code | The expected exit status of the child.

## WritePipeHandle()

FileHandle crashpad::test::WinMultiprocess::WritePipeHandle | ( |  | ) | const

protected

Returns the write pipe's file handle.

This method may be called by either the parent or the child process. Anything written to this file handle in this process will appear on the read pipe in the partner 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_multiprocess.h
- test/win/win_multiprocess.cc