/* pty.h: Pseudoterminal handling functions. */

#ifndef _PTY_H
#define _PTY_H

#include <bits/termios.h>
#include <sys/types.h>

#ifdef __cplusplus
extern "C"
{
#endif

    /* Find an available pseudoterminal pair and initialize it, returning file descriptors for both sides. */
    int openpty(int* master, int* slave, char* name, const struct termios* term, const struct winsize* win);

    /* Create a new process operating in a pseudoterminal. */
    pid_t forkpty(int* master, char* name, const struct termios* term, const struct winsize* win);

#ifdef __cplusplus
}
#endif

#endif