Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: handler/main.cc

Issue 1408473002: ChildPortHandshake: allow receive rights to be received (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/crashpad_client_mac.cc ('k') | util/mach/child_port.defs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: handler/main.cc
diff --git a/handler/main.cc b/handler/main.cc
index 5f192f92752f3099802f0450fffad4a4f1ef0c18..860951dc4476e7688e654b9a34c054bc173b4ede 100644
--- a/handler/main.cc
+++ b/handler/main.cc
@@ -19,6 +19,7 @@
#include <string>
#include "base/files/file_path.h"
+#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
@@ -219,9 +220,12 @@ int HandlerMain(int argc, char* argv[]) {
#if defined(OS_MACOSX)
CloseStdinAndStdout();
- ChildPortHandshake::RunClient(options.handshake_fd,
- exception_handler_server.receive_port(),
- MACH_MSG_TYPE_MAKE_SEND);
+ if (!ChildPortHandshake::RunClientForFD(
+ base::ScopedFD(options.handshake_fd),
+ exception_handler_server.receive_port(),
+ MACH_MSG_TYPE_MAKE_SEND)) {
+ return EXIT_FAILURE;
+ }
#endif // OS_MACOSX
scoped_ptr<CrashReportDatabase> database(CrashReportDatabase::Initialize(
« no previous file with comments | « client/crashpad_client_mac.cc ('k') | util/mach/child_port.defs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698