Module Core_unix.Terminal_io

module Terminal_io: sig .. end

type t = Unix.terminal_io = {
   mutable c_ignbrk :bool; (*Ignore the break condition.*)
   mutable c_brkint :bool; (*Signal interrupt on break condition.*)
   mutable c_ignpar :bool; (*Ignore characters with parity errors.*)
   mutable c_parmrk :bool; (*Mark parity errors.*)
   mutable c_inpck :bool; (*Enable parity check on input.*)
   mutable c_istrip :bool; (*Strip 8th bit on input characters.*)
   mutable c_inlcr :bool; (*Map NL to CR on input.*)
   mutable c_igncr :bool; (*Ignore CR on input.*)
   mutable c_icrnl :bool; (*Map CR to NL on input.*)
   mutable c_ixon :bool; (*Recognize XON/XOFF characters on input.*)
   mutable c_ixoff :bool; (*Emit XON/XOFF chars to control input flow.*)
   mutable c_opost :bool; (*Enable output processing.*)
   mutable c_obaud :int; (*Output baud rate (0 means close connection).*)
   mutable c_ibaud :int; (*Input baud rate.*)
   mutable c_csize :int; (*Number of bits per character (5-8).*)
   mutable c_cstopb :int; (*Number of stop bits (1-2).*)
   mutable c_cread :bool; (*Reception is enabled.*)
   mutable c_parenb :bool; (*Enable parity generation and detection.*)
   mutable c_parodd :bool; (*Specify odd parity instead of even.*)
   mutable c_hupcl :bool; (*Hang up on last close.*)
   mutable c_clocal :bool; (*Ignore modem status lines.*)
   mutable c_isig :bool; (*Generate signal on INTR, QUIT, SUSP.*)
   mutable c_icanon :bool; (*Enable canonical processing (line buffering and editing)*)
   mutable c_noflsh :bool; (*Disable flush after INTR, QUIT, SUSP.*)
   mutable c_echo :bool; (*Echo input characters.*)
   mutable c_echoe :bool; (*Echo ERASE (to erase previous character).*)
   mutable c_echok :bool; (*Echo KILL (to erase the current line).*)
   mutable c_echonl :bool; (*Echo NL even if c_echo is not set.*)
   mutable c_vintr :char; (*Interrupt character (usually ctrl-C).*)
   mutable c_vquit :char; (*Quit character (usually ctrl-\).*)
   mutable c_verase :char; (*Erase character (usually DEL or ctrl-H).*)
   mutable c_vkill :char; (*Kill line character (usually ctrl-U).*)
   mutable c_veof :char; (*End-of-file character (usually ctrl-D).*)
   mutable c_veol :char; (*Alternate end-of-line char. (usually none).*)
   mutable c_vmin :int; (*Minimum number of characters to read before the read request is satisfied.*)
   mutable c_vtime :int; (*Maximum read wait (in 0.1s units).*)
   mutable c_vstart :char; (*Start character (usually ctrl-Q).*)
   mutable c_vstop :char; (*Stop character (usually ctrl-S).*)
}
type setattr_when = Unix.setattr_when = 
| TCSANOW
| TCSADRAIN
| TCSAFLUSH
val tcgetattr : Core_unix.File_descr.t -> t
Return the status of the terminal referred to by the given file descriptor.
val tcsetattr : t ->
Core_unix.File_descr.t -> mode:setattr_when -> unit
Set the status of the terminal referred to by the given file descriptor. The second argument indicates when the status change takes place: immediately (TCSANOW), when all pending output has been transmitted (TCSADRAIN), or after flushing all input that has been received but not read (TCSAFLUSH). TCSADRAIN is recommended when changing the output parameters; TCSAFLUSH, when changing the input parameters.
val tcsendbreak : Core_unix.File_descr.t -> duration:int -> unit
Send a break condition on the given file descriptor. The second argument is the duration of the break, in 0.1s units; 0 means standard duration (0.25s).
val tcdrain : Core_unix.File_descr.t -> unit
Waits until all output written on the given file descriptor has been transmitted.
type flush_queue = Unix.flush_queue = 
| TCIFLUSH
| TCOFLUSH
| TCIOFLUSH
val tcflush : Core_unix.File_descr.t -> mode:flush_queue -> unit
Discard data written on the given file descriptor but not yet transmitted, or data received but not yet read, depending on the second argument: TCIFLUSH flushes data received but not read, TCOFLUSH flushes data written but not transmitted, and TCIOFLUSH flushes both.
type flow_action = Unix.flow_action = 
| TCOOFF
| TCOON
| TCIOFF
| TCION
val tcflow : Core_unix.File_descr.t -> mode:flow_action -> unit
Suspend or restart reception or transmission of data on the given file descriptor, depending on the second argument: TCOOFF suspends output, TCOON restarts output, TCIOFF transmits a STOP character to suspend input, and TCION transmits a START character to restart input.
val setsid : unit -> int
Put the calling process in a new session and detach it from its controlling terminal.
val sexp_of_t : t -> Sexplib.Sexp.t
val sexp_of_setattr_when : setattr_when -> Sexplib.Sexp.t

Return the status of the terminal referred to by the given file descriptor.

Set the status of the terminal referred to by the given file descriptor. The second argument indicates when the status change takes place: immediately (TCSANOW), when all pending output has been transmitted (TCSADRAIN), or after flushing all input that has been received but not read (TCSAFLUSH). TCSADRAIN is recommended when changing the output parameters; TCSAFLUSH, when changing the input parameters.

Send a break condition on the given file descriptor. The second argument is the duration of the break, in 0.1s units; 0 means standard duration (0.25s).

Waits until all output written on the given file descriptor has been transmitted.
val flush_queue_of_sexp : Sexplib.Sexp.t -> flush_queue
val sexp_of_flush_queue : flush_queue -> Sexplib.Sexp.t

Discard data written on the given file descriptor but not yet transmitted, or data received but not yet read, depending on the second argument: TCIFLUSH flushes data received but not read, TCOFLUSH flushes data written but not transmitted, and TCIOFLUSH flushes both.
val flow_action_of_sexp : Sexplib.Sexp.t -> flow_action
val sexp_of_flow_action : flow_action -> Sexplib.Sexp.t

Suspend or restart reception or transmission of data on the given file descriptor, depending on the second argument: TCOOFF suspends output, TCOON restarts output, TCIOFF transmits a STOP character to suspend input, and TCION transmits a START character to restart input.

Put the calling process in a new session and detach it from its controlling terminal.