mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
linux: make GetHandlerSocket() params optional
It turns out it's frequently convenient to only grab one of these at a time. Change-Id: Ie4a05583a5c875163154efc485d57a014101cc16 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1838011 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
676a190308
commit
eb0c4726f1
@ -124,8 +124,8 @@ class CrashpadClient {
|
||||
//! `StartHandler()` must have successfully been called before calling this
|
||||
//! method.
|
||||
//!
|
||||
//! \param[out] sock The socket connected to the handler.
|
||||
//! \param[out] pid The handler's process ID.
|
||||
//! \param[out] sock The socket connected to the handler, if not `nullptr`.
|
||||
//! \param[out] pid The handler's process ID, if not `nullptr`.
|
||||
//! \return `true` on success. Otherwise `false` with a message logged.
|
||||
static bool GetHandlerSocket(int* sock, pid_t* pid);
|
||||
|
||||
|
@ -295,8 +295,12 @@ class RequestCrashDumpHandler : public SignalHandler {
|
||||
if (!sock_to_handler_.is_valid()) {
|
||||
return false;
|
||||
}
|
||||
*sock = sock_to_handler_.get();
|
||||
*pid = handler_pid_;
|
||||
if (sock) {
|
||||
*sock = sock_to_handler_.get();
|
||||
}
|
||||
if (pid) {
|
||||
*pid = handler_pid_;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user