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

Unified Diff: util/test/mac/mach_multiprocess.h

Issue 491363002: Improvements for MachMultiprocess (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Add a pipe going in the other direction Created 6 years, 4 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 | « no previous file | util/test/mac/mach_multiprocess.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/test/mac/mach_multiprocess.h
diff --git a/util/test/mac/mach_multiprocess.h b/util/test/mac/mach_multiprocess.h
index 666b128fa5f846e7e07148f4321d09cda45f2a70..d68355462976888be6ae166c4895dc98f4d1a996 100644
--- a/util/test/mac/mach_multiprocess.h
+++ b/util/test/mac/mach_multiprocess.h
@@ -31,8 +31,7 @@ struct MachMultiprocessInfo;
//!
//! These tests are `fork()`-based. The parent process has access to the child
//! process’ task port. The parent and child processes are able to communicate
-//! via Mach IPC, and the child process can also send messages to the parent
-//! process via a POSIX pipe.
+//! via Mach IPC, and via a pair of POSIX pipes.
//!
//! Subclasses are expected to implement the parent and child by overriding the
//! appropriate methods.
@@ -79,12 +78,19 @@ class MachMultiprocess {
//! This method may only be called by the parent process.
pid_t ChildPID() const;
- //! \brief Returns the pipe’s file descriptor.
+ //! \brief Returns the read pipe’s file descriptor.
//!
- //! This method may be called by either the parent or the child process. In
- //! the parent process, the pipe is read-only, and in the child process, it is
- //! write-only.
- int PipeFD() const;
+ //! 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 the this file descriptor in this process.
+ int ReadPipeFD() const;
+
+ //! \brief Returns the write pipe’s file descriptor.
+ //!
+ //! This method may be called by either the parent or the child process.
+ //! Anything written to this file descriptor in this process will appear on
+ //! the read pipe in the partner process.
+ int WritePipeFD() const;
//! \brief Returns a receive right for the local port.
//!
« no previous file with comments | « no previous file | util/test/mac/mach_multiprocess.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698