module Terminal_io: sig
.. end
type
t = Unix.terminal_io
= {
|
mutable c_ignbrk :bool ; |
|
mutable c_brkint :bool ; |
|
mutable c_ignpar :bool ; |
|
mutable c_parmrk :bool ; |
|
mutable c_inpck :bool ; |
|
mutable c_istrip :bool ; |
|
mutable c_inlcr :bool ; |
|
mutable c_igncr :bool ; |
|
mutable c_icrnl :bool ; |
|
mutable c_ixon :bool ; |
|
mutable c_ixoff :bool ; |
|
mutable c_opost :bool ; |
|
mutable c_obaud :int ; |
|
mutable c_ibaud :int ; |
|
mutable c_csize :int ; |
|
mutable c_cstopb :int ; |
|
mutable c_cread :bool ; |
|
mutable c_parenb :bool ; |
|
mutable c_parodd :bool ; |
|
mutable c_hupcl :bool ; |
|
mutable c_clocal :bool ; |
|
mutable c_isig :bool ; |
|
mutable c_icanon :bool ; |
|
mutable c_noflsh :bool ; |
|
mutable c_echo :bool ; |
|
mutable c_echoe :bool ; |
|
mutable c_echok :bool ; |
|
mutable c_echonl :bool ; |
|
mutable c_vintr :char ; |
|
mutable c_vquit :char ; |
|
mutable c_verase :char ; |
|
mutable c_vkill :char ; |
|
mutable c_veof :char ; |
|
mutable c_veol :char ; |
|
mutable c_vmin :int ; |
|
mutable c_vtime :int ; |
|
mutable c_vstart :char ; |
|
mutable c_vstop :char ; |
}
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.