[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 <scottmg@chromium.org>
Commit-Queue: Adam Barth <abarth@chromium.org>
This commit is contained in:
Adam Barth 2019-05-21 11:21:31 -07:00 committed by Commit Bot
parent bc9104541f
commit 5ea6551bae

View File

@ -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