The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
pty.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
sys/ioctl.h
>
4
#include <
termios.h
>
5
6
/**
7
* @file pty.h
8
* @brief open a pseudo-terminal pair, and make one a process's terminal.
9
*/
10
11
/**
12
* open a new pseudo-terminal pair.
13
* @param master receives the master fd.
14
* @param slave receives the slave fd.
15
* @param name receives the slave's path, if not NULL (at least 16 bytes).
16
* @param settings the slave's termios, if not NULL.
17
* @param size the window size, if not NULL.
18
* @return 0, or -1 with errno set.
19
*/
20
int
openpty
(
int
*master,
int
*slave,
char
*name,
const
struct
termios
*settings,
21
const
struct
winsize
*size);
22
23
/**
24
* make fd the terminal of the calling process: start a new session, make
25
* fd its controlling terminal, put fd on stdin, stdout and stderr, and
26
* close fd. for the child of a terminal app, before execve.
27
* @return 0, or -1 with errno set.
28
*/
29
int
login_tty
(
int
fd);
ioctl.h
device control requests.
login_tty
int login_tty(int fd)
make fd the terminal of the calling process: start a new session, make fd its controlling terminal,...
openpty
int openpty(int *master, int *slave, char *name, const struct termios *settings, const struct winsize *size)
open a new pseudo-terminal pair.
termios.h
terminal settings.
termios
Definition
termios.h:19
winsize
Definition
ioctl.h:39
src
libc
include
pty.h
Generated by
1.18.0