5 Author: Tatu Ylonen <ylo@cs.hut.fi>
7 Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
10 Created: Fri Mar 17 05:03:28 1995 ylo
12 Functions for allocating a pseudo-terminal and making it the controlling
22 /* Allocates and opens a pty. Returns 0 if no pty could be allocated,
23 or nonzero if a pty was successfully allocated. On success, open file
24 descriptors for the pty and tty sides and the name of the tty side are
25 returned (the buffer must be able to hold at least 64 characters). */
26 int pty_allocate(int *ptyfd, int *ttyfd, char *ttyname);
28 /* Releases the tty. Its ownership is returned to root, and permissions to
30 void pty_release(const char *ttyname);
32 /* Makes the tty the processes controlling tty and sets it to sane modes.
33 This may need to reopen the tty to get rid of possible eavesdroppers. */
34 void pty_make_controlling_tty(int *ttyfd, const char *ttyname);
36 /* Changes the window size associated with the pty. */
37 void pty_change_window_size(int ptyfd, int row, int col,
38 int xpixel, int ypixel);