Module: sys.pty
Source: ./sys/pty.reef
Overview
sys/pty - POSIX pty master helpers
Thin wrapper over reef_pty_* for opening a pty master, setting winsize, spawning a child attached to the slave, and closing the master.
argv for pty_spawn matches process_spawn: full POSIX argv (do not prepend program).
Types
Pty
Fields:
| Name | Type |
|---|---|
master_fd |
int |
slave_name |
string |
Functions
fn pty_open(): option.Option[Pty]
fn pty_ok(p: Pty): bool
fn pty_set_winsize(p: Pty, cols: int, rows: int): bool
fn pty_spawn(p: Pty, program: string, argv: [string]): result.Result[int, error.Error]
Procedures
proc pty_close(p: Pty)
Generated by reefc doc