From 5ea6551baeb4404f47ebf89e23cf2aedb716ed73 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 21 May 2019 11:21:31 -0700 Subject: [PATCH] [fuchsia] Update to fdio_pipe_half2 fdio_pipe_half is being replaced with fdio_pipe_half2. Change-Id: I01294f01692b0a90c00815ad02b6c30e41edba07 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1623147 Reviewed-by: Scott Graham Commit-Queue: Adam Barth --- test/multiprocess_exec_fuchsia.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/multiprocess_exec_fuchsia.cc b/test/multiprocess_exec_fuchsia.cc index f91b3edc..2f675869 100644 --- a/test/multiprocess_exec_fuchsia.cc +++ b/test/multiprocess_exec_fuchsia.cc @@ -30,14 +30,12 @@ namespace test { namespace { void AddPipe(fdio_spawn_action_t* action, int target_fd, int* fd_out) { - zx_handle_t handle; - uint32_t id; - zx_status_t status = fdio_pipe_half(&handle, &id); - ZX_CHECK(status >= 0, status) << "fdio_pipe_half"; + zx_handle_t handle = ZX_HANDLE_INVALID; + zx_status_t status = fdio_pipe_half2(fd_out, &handle); + ZX_CHECK(status == ZX_OK, status) << "fdio_pipe_half2"; action->action = FDIO_SPAWN_ACTION_ADD_HANDLE; - action->h.id = PA_HND(PA_HND_TYPE(id), target_fd); + action->h.id = PA_HND(PA_FD, target_fd); action->h.handle = handle; - *fd_out = status; } } // namespace