module Terminal_io: sig
.. end
include Terminal_io_intf.Types
val tcgetattr : Core_unix.file_descr -> t
Return the status of the terminal referred to by the given
file descriptor.
val tcsetattr : Core_unix.file_descr -> mode:setattr_when -> t -> 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 -> 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 -> 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 -> 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 -> 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.