1// Copyright 2016 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#pragma once
6
7#include <stdbool.h>
8#include <stddef.h>
9#include <stdint.h>
10
11// readable: is the pipe readable on the child side?
12// returns [our_fd, child_fd]
13int stdio_pipe(int pipe_fds[2], bool readable);
14
15int read_to_end(int fd, uint8_t** buf, size_t* buf_size);
16