A client for an ExceptionHandlerServer.
More...
#include "util/linux/exception_handler_client.h"
◆ ExceptionHandlerClient()
crashpad::ExceptionHandlerClient::ExceptionHandlerClient |
( |
int |
sock, |
|
|
bool |
multiple_clients |
|
) |
| |
Constructs this object.
- Parameters
-
[in] | sock | A socket connected to an ExceptionHandlerServer. |
[in] | multiple_clients | true if this socket may be used by multiple clients. |
◆ GetHandlerCredentials()
bool crashpad::ExceptionHandlerClient::GetHandlerCredentials |
( |
ucred * |
creds | ) |
|
Communicates with the handler to determine its credentials.
If using a multi-client socket, this method should be called before sharing the client socket end, or the handler's response may not be received.
- Parameters
-
[out] | creds | The handler process' credentials, valid if this method returns true . |
- Returns
true
on success. Otherwise, false
with a message logged.
◆ RequestCrashDump()
Request a crash dump from the ExceptionHandlerServer.
This method blocks until the crash dump is complete.
- Parameters
-
[in] | info | Information about this client. |
- Returns
- 0 on success or an error code on failure.
◆ SetCanSetPtracer()
void crashpad::ExceptionHandlerClient::SetCanSetPtracer |
( |
bool |
can_set_ptracer | ) |
|
Enables or disables SetPtracer().
- Parameters
-
[in] | can_set_ptracer | Whether SetPtracer should be enabled. |
◆ SetPtracer()
int crashpad::ExceptionHandlerClient::SetPtracer |
( |
pid_t |
pid | ) |
|
Uses prctl(PR_SET_PTRACER, ...)
to set the process with process ID pid as the ptracer for this process.
- Parameters
-
[in] | pid | The process ID of the process to be set as this process' ptracer. |
- Returns
- 0 on success or an error code on failure.
The documentation for this class was generated from the following files:
- util/linux/exception_handler_client.h
- util/linux/exception_handler_client.cc