blob: 399a90bd1f11ffc097f92fe5369e52de459b1f6f [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include <zircon/types.h>
struct timeval;
void fuchsia_init_async(void);
int chroot(const char* path);
// Note: char** env is consumed by this function and will be freed.
int fuchsia_launch_child(const char* command, char** env, int in, int out, int err);
// This implements the subset of select() functionality used by openssh.
// Uses void* instead of fd_set* for the read/write fd sets since this compat
// header is included in smult_curve25519_ref.c, which declares a completely
// unrelated function called select(). Doesn't export exceptfds.
int fuchsia_select(int nfds, void* readfds, void* writefds,
struct timeval* timeout);
// Open a PTY client of |fd|, where |fd| is either a PTY server or controlling
// client. The |id| must be unique for the server. The client where |id| is 0 is
// the controlling client. Returns a file descriptor for the newly opened
// client.
int fuchsia_open_pty_client(int fd, uint32_t id);
#define CUSTOM_SYS_AUTH_PASSWD