Support passing native platform handles via LaunchProcess

Desktop / Chromium - Wez [chromium.org] - 10 August 2017 01:24 EDT

Since some types of Fuchsia handle (e.g. channels) cannot be duplicated, LaunchProcess transfers the supplied handles, requiring the caller to provide copies of any handles it wishes to retain.

Callers must provide a unique identifier for each handle which is to be transferred, which the client process can use to retrieve the handle via mx_get_startup_handle().

This will be used to pass the initial Mojo channel to child processes.

Bug: 740791, 706592 Change-Id: I4f9028db730533605142b4911607efb1e0e3c33a Reviewed-on: https://chromium-review.googlesource.com/602089 Commit-Queue: Wez

1603c32 Support passing native platform handles via LaunchProcess.
base/metrics/field_trial.cc | 4 ++-
base/metrics/field_trial.h | 5 ++-
base/process/launch.h | 18 +++++++++--
base/process/launch_fuchsia.cc | 5 +++
base/process/process_util_unittest.cc | 60 ++++++++++++++++++++++++++++++++++-
5 files changed, 86 insertions(+), 6 deletions(-)

Upstream: git.chromium.org


  • Share