type t = Unix.terminal_io = {
}
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val sexp_of_setattr_when : setattr_when -> Ppx_sexp_conv_lib.Sexp.t
val tcgetattr : File_descr.t -> t
Return the status of the terminal referred to by the given file descriptor.
val tcsetattr : t -> 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 : 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 : File_descr.t -> unit
Waits until all output written on the given file descriptor has been transmitted.
val sexp_of_flush_queue : flush_queue -> Ppx_sexp_conv_lib.Sexp.t
val flush_queue_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> flush_queue
val tcflush : 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.
val sexp_of_flow_action : flow_action -> Ppx_sexp_conv_lib.Sexp.t
val flow_action_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> flow_action
val tcflow : 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.