diff --git a/iostream/Iostream_unix/In/index.html b/iostream/Iostream_unix/In/index.html index 68397599..34e85eb8 100644 --- a/iostream/Iostream_unix/In/index.html +++ b/iostream/Iostream_unix/In/index.html @@ -1,2 +1,2 @@ -
Iostream_unix.Inval of_unix_fd : ?close_noerr:bool -> Unix.file_descr -> Iostream.In.t_seekableCreate an in stream from a raw Unix file descriptor. The file descriptor must be opened for reading.
Iostream_unix.Inval of_unix_fd : ?close_noerr:bool -> Unix.file_descr -> Iostream.In.t_seekableCreate an in stream from a raw Unix file descriptor. The file descriptor must be opened for reading.
Iostream_unix.Outval of_unix_fd : Unix.file_descr -> Iostream.Out.t_seekableOutput stream directly writing into the given Unix file descriptor.
Iostream_unix.Outval of_unix_fd : Unix.file_descr -> Iostream.Out.t_seekableOutput stream directly writing into the given Unix file descriptor.
Same as single_write, but take the data from a bigarray.
val in_channel_of_descr : file_descr -> in_channelCreate an input channel reading from the given descriptor. The channel is initially in binary mode; use set_binary_mode_in ic false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.
On Windows: Stdlib.set_binary_mode_in always fails on channels created with this function.
Beware that input channels are buffered, so more characters may have been read from the descriptor than those accessed using channel functions. Channels also keep a copy of the current position in the file.
Closing the channel ic returned by in_channel_of_descr fd using close_in ic also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.
If several channels are created on the same descriptor, one of the channels must be closed, but not the others. Consider for example a descriptor s connected to a socket and two channels ic = in_channel_of_descr s and oc = out_channel_of_descr s. The recommended closing protocol is to perform close_out oc, which flushes buffered output to the socket then closes the socket. The ic channel must not be closed and will be collected by the GC eventually.
val out_channel_of_descr : file_descr -> out_channelCreate an output channel writing on the given descriptor. The channel is initially in binary mode; use set_binary_mode_out oc false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.
On Windows: Stdlib.set_binary_mode_out always fails on channels created with this function.
Beware that output channels are buffered, so you may have to call Stdlib.flush to ensure that all data has been sent to the descriptor. Channels also keep a copy of the current position in the file.
Closing the channel oc returned by out_channel_of_descr fd using close_out oc also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.
See Unix.in_channel_of_descr for a discussion of the closing protocol when several channels are created on the same descriptor.
val descr_of_in_channel : in_channel -> file_descrReturn the descriptor corresponding to an input channel.
val descr_of_out_channel : out_channel -> file_descrReturn the descriptor corresponding to an output channel.
Positioning modes for lseek.
val lseek : file_descr -> int -> seek_command -> intSet the current position for a file descriptor, and return the resulting offset (from the beginning of the file).
val ftruncate : file_descr -> int -> unitTruncates the file corresponding to the given descriptor to the given size.
type stats = {st_dev : int;Device number
*)st_ino : int;Inode number
*)st_kind : file_kind;Kind of the file
*)st_perm : file_perm;Access rights
*)st_nlink : int;Number of links
*)st_uid : int;User id of the owner
*)st_gid : int;Group ID of the file's group
*)st_rdev : int;Device ID (if special file)
*)st_size : int;Size in bytes
*)st_atime : float;Last access time
*)st_mtime : float;Last modification time
*)st_ctime : float;Last status change time
*)}The information returned by the stat calls.
val stat : string -> statsReturn the information for the named file.
val lstat : string -> statsSame as stat, but in case the file is a symbolic link, return the information for the link itself.
val fstat : file_descr -> statsReturn the information for the file associated with the given descriptor.
val isatty : file_descr -> boolReturn true if the given file descriptor refers to a terminal or console window, false otherwise.
module LargeFile : sig ... endFile operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.
Same as single_write, but take the data from a bigarray.
val in_channel_of_descr : file_descr -> Stdlib.in_channelCreate an input channel reading from the given descriptor. The channel is initially in binary mode; use set_binary_mode_in ic false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.
On Windows: Stdlib.set_binary_mode_in always fails on channels created with this function.
Beware that input channels are buffered, so more characters may have been read from the descriptor than those accessed using channel functions. Channels also keep a copy of the current position in the file.
Closing the channel ic returned by in_channel_of_descr fd using close_in ic also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.
If several channels are created on the same descriptor, one of the channels must be closed, but not the others. Consider for example a descriptor s connected to a socket and two channels ic = in_channel_of_descr s and oc = out_channel_of_descr s. The recommended closing protocol is to perform close_out oc, which flushes buffered output to the socket then closes the socket. The ic channel must not be closed and will be collected by the GC eventually.
val out_channel_of_descr : file_descr -> Stdlib.out_channelCreate an output channel writing on the given descriptor. The channel is initially in binary mode; use set_binary_mode_out oc false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.
On Windows: Stdlib.set_binary_mode_out always fails on channels created with this function.
Beware that output channels are buffered, so you may have to call Stdlib.flush to ensure that all data has been sent to the descriptor. Channels also keep a copy of the current position in the file.
Closing the channel oc returned by out_channel_of_descr fd using close_out oc also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.
See Unix.in_channel_of_descr for a discussion of the closing protocol when several channels are created on the same descriptor.
val descr_of_in_channel : Stdlib.in_channel -> file_descrReturn the descriptor corresponding to an input channel.
val descr_of_out_channel : Stdlib.out_channel -> file_descrReturn the descriptor corresponding to an output channel.
Positioning modes for lseek.
val lseek : file_descr -> int -> seek_command -> intSet the current position for a file descriptor, and return the resulting offset (from the beginning of the file).
val ftruncate : file_descr -> int -> unitTruncates the file corresponding to the given descriptor to the given size.
type stats = {st_dev : int;Device number
*)st_ino : int;Inode number
*)st_kind : file_kind;Kind of the file
*)st_perm : file_perm;Access rights
*)st_nlink : int;Number of links
*)st_uid : int;User id of the owner
*)st_gid : int;Group ID of the file's group
*)st_rdev : int;Device ID (if special file)
*)st_size : int;Size in bytes
*)st_atime : float;Last access time
*)st_mtime : float;Last modification time
*)st_ctime : float;Last status change time
*)}The information returned by the stat calls.
val stat : string -> statsReturn the information for the named file.
val lstat : string -> statsSame as stat, but in case the file is a symbolic link, return the information for the link itself.
val fstat : file_descr -> statsReturn the information for the file associated with the given descriptor.
val isatty : file_descr -> boolReturn true if the given file descriptor refers to a terminal or console window, false otherwise.
module LargeFile : sig ... endFile operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.
val map_file :
file_descr ->
?pos:int64 ->
('a, 'b) Stdlib.Bigarray.kind ->
@@ -37,15 +37,20 @@
file_descr ->
file_descr ->
file_descr ->
- intcreate_process_env prog args env stdin stdout stderr works as create_process, except that the extra argument env specifies the environment passed to the program.
val open_process_in : string -> in_channelHigh-level pipe and process management. This function runs the given command in parallel with the program. The standard output of the command is redirected to a pipe, which can be read via the returned input channel. The command is interpreted by the shell /bin/sh (or cmd.exe on Windows), cf. system. The Filename.quote_command function can be used to quote the command and its arguments as appropriate for the shell being used. If the command does not need to be run through the shell, open_process_args_in can be used as a more robust and more efficient alternative to open_process_in.
val open_process_out : string -> out_channelSame as open_process_in, but redirect the standard input of the command to a pipe. Data written to the returned output channel is sent to the standard input of the command. Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization. If the command does not need to be run through the shell, open_process_args_out can be used instead of open_process_out.
val open_process : string -> in_channel * out_channelSame as open_process_out, but redirects both the standard input and standard output of the command to pipes connected to the two returned channels. The input channel is connected to the output of the command, and the output channel to the input of the command. If the command does not need to be run through the shell, open_process_args can be used instead of open_process.
create_process_env prog args env stdin stdout stderr works as create_process, except that the extra argument env specifies the environment passed to the program.
val open_process_in : string -> Stdlib.in_channelHigh-level pipe and process management. This function runs the given command in parallel with the program. The standard output of the command is redirected to a pipe, which can be read via the returned input channel. The command is interpreted by the shell /bin/sh (or cmd.exe on Windows), cf. system. The Filename.quote_command function can be used to quote the command and its arguments as appropriate for the shell being used. If the command does not need to be run through the shell, open_process_args_in can be used as a more robust and more efficient alternative to open_process_in.
val open_process_out : string -> Stdlib.out_channelSame as open_process_in, but redirect the standard input of the command to a pipe. Data written to the returned output channel is sent to the standard input of the command. Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization. If the command does not need to be run through the shell, open_process_args_out can be used instead of open_process_out.
val open_process : string -> Stdlib.in_channel * Stdlib.out_channelSame as open_process_out, but redirects both the standard input and standard output of the command to pipes connected to the two returned channels. The input channel is connected to the output of the command, and the output channel to the input of the command. If the command does not need to be run through the shell, open_process_args can be used instead of open_process.
val open_process_full :
string ->
string array ->
- in_channel * out_channel * in_channelSimilar to open_process, but the second argument specifies the environment passed to the command. The result is a triple of channels connected respectively to the standard output, standard input, and standard error of the command. If the command does not need to be run through the shell, open_process_args_full can be used instead of open_process_full.
val open_process_args : string -> string array -> in_channel * out_channelopen_process_args prog args runs the program prog with arguments args. Note that the first argument, args.(0), is by convention the filename of the program being executed, just like Sys.argv.(0). The new process executes concurrently with the current process. The standard input and output of the new process are redirected to pipes, which can be respectively read and written via the returned channels. The input channel is connected to the output of the program, and the output channel to the input of the program.
Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization.
The executable file prog is searched for in the path. This behaviour changed in 4.12; previously prog was looked up only in the current directory.
The new process has the same environment as the current process.
val open_process_args_in : string -> string array -> in_channelSame as open_process_args, but redirects only the standard output of the new process.
val open_process_args_out : string -> string array -> out_channelSame as open_process_args, but redirects only the standard input of the new process.
val open_process_args_full :
+ Stdlib.in_channel * Stdlib.out_channel * Stdlib.in_channelSimilar to open_process, but the second argument specifies the environment passed to the command. The result is a triple of channels connected respectively to the standard output, standard input, and standard error of the command. If the command does not need to be run through the shell, open_process_args_full can be used instead of open_process_full.
val open_process_args :
+ string ->
+ string array ->
+ Stdlib.in_channel * Stdlib.out_channelopen_process_args prog args runs the program prog with arguments args. Note that the first argument, args.(0), is by convention the filename of the program being executed, just like Sys.argv.(0). The new process executes concurrently with the current process. The standard input and output of the new process are redirected to pipes, which can be respectively read and written via the returned channels. The input channel is connected to the output of the program, and the output channel to the input of the program.
Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization.
The executable file prog is searched for in the path. This behaviour changed in 4.12; previously prog was looked up only in the current directory.
The new process has the same environment as the current process.
val open_process_args_in : string -> string array -> Stdlib.in_channelSame as open_process_args, but redirects only the standard output of the new process.
val open_process_args_out : string -> string array -> Stdlib.out_channelSame as open_process_args, but redirects only the standard input of the new process.
val open_process_args_full :
string ->
string array ->
string array ->
- in_channel * out_channel * in_channelSimilar to open_process_args, but the third argument specifies the environment passed to the new process. The result is a triple of channels connected respectively to the standard output, standard input, and standard error of the program.
val process_in_pid : in_channel -> intReturn the pid of a process opened via open_process_args_in or the pid of the shell opened via open_process_in.
val process_out_pid : out_channel -> intReturn the pid of a process opened via open_process_args_out or the pid of the shell opened via open_process_out.
val process_pid : (in_channel * out_channel) -> intReturn the pid of a process opened via open_process_args or the pid of the shell opened via open_process_args.
val process_full_pid : (in_channel * out_channel * in_channel) -> intReturn the pid of a process opened via open_process_args_full or the pid of the shell opened via open_process_full.
val close_process_in : in_channel -> process_statusClose channels opened by open_process_in, wait for the associated command to terminate, and return its termination status.
val close_process_out : out_channel -> process_statusClose channels opened by open_process_out, wait for the associated command to terminate, and return its termination status.
val close_process : (in_channel * out_channel) -> process_statusClose channels opened by open_process, wait for the associated command to terminate, and return its termination status.
val close_process_full :
- (in_channel * out_channel * in_channel) ->
+ Stdlib.in_channel * Stdlib.out_channel * Stdlib.in_channelSimilar to open_process_args, but the third argument specifies the environment passed to the new process. The result is a triple of channels connected respectively to the standard output, standard input, and standard error of the program.
val process_in_pid : Stdlib.in_channel -> intReturn the pid of a process opened via open_process_args_in or the pid of the shell opened via open_process_in.
val process_out_pid : Stdlib.out_channel -> intReturn the pid of a process opened via open_process_args_out or the pid of the shell opened via open_process_out.
val process_pid : (Stdlib.in_channel * Stdlib.out_channel) -> intReturn the pid of a process opened via open_process_args or the pid of the shell opened via open_process_args.
val process_full_pid :
+ (Stdlib.in_channel * Stdlib.out_channel * Stdlib.in_channel) ->
+ intReturn the pid of a process opened via open_process_args_full or the pid of the shell opened via open_process_full.
val close_process_in : Stdlib.in_channel -> process_statusClose channels opened by open_process_in, wait for the associated command to terminate, and return its termination status.
val close_process_out : Stdlib.out_channel -> process_statusClose channels opened by open_process_out, wait for the associated command to terminate, and return its termination status.
val close_process : (Stdlib.in_channel * Stdlib.out_channel) -> process_statusClose channels opened by open_process, wait for the associated command to terminate, and return its termination status.
val close_process_full :
+ (Stdlib.in_channel * Stdlib.out_channel * Stdlib.in_channel) ->
process_statusClose channels opened by open_process_full, wait for the associated command to terminate, and return its termination status.
symlink ?to_dir src dst creates the file dst as a symbolic link to the file src. On Windows, ~to_dir indicates if the symbolic link points to a directory or a file; if omitted, symlink examines src using stat and picks appropriately, if src does not exist then false is assumed (for this reason, it is recommended that the ~to_dir parameter be specified in new code). On Unix, ~to_dir is ignored.
Windows symbolic links are available in Windows Vista onwards. There are some important differences between Windows symlinks and their POSIX counterparts.
Windows symbolic links come in two flavours: directory and regular, which designate whether the symbolic link points to a directory or a file. The type must be correct - a directory symlink which actually points to a file cannot be selected with chdir and a file symlink which actually points to a directory cannot be read or written (note that Cygwin's emulation layer ignores this distinction).
When symbolic links are created to existing targets, this distinction doesn't matter and symlink will automatically create the correct kind of symbolic link. The distinction matters when a symbolic link is created to a non-existent target.
The other caveat is that by default symbolic links are a privileged operation. Administrators will always need to be running elevated (or with UAC disabled) and by default normal user accounts need to be granted the SeCreateSymbolicLinkPrivilege via Local Security Policy (secpol.msc) or via Active Directory.
has_symlink can be used to check that a process is able to create symbolic links.
Returns true if the user is able to create symbolic links. On Windows, this indicates that the user not only has the SeCreateSymbolicLinkPrivilege but is also running elevated, if necessary. On other platforms, this is simply indicates that the symlink system call is available.
val select :
file_descr list ->
file_descr list ->
@@ -83,4 +88,7 @@
file_descr ->
socket_optint_option ->
int option ->
- unitSame as setsockopt for a socket option whose value is an int option.
val getsockopt_float : file_descr -> socket_float_option -> floatSame as getsockopt for a socket option whose value is a floating-point number.
val setsockopt_float : file_descr -> socket_float_option -> float -> unitSame as setsockopt for a socket option whose value is a floating-point number.
val getsockopt_error : file_descr -> error optionReturn the error condition associated with the given socket, and clear it.
val open_connection : sockaddr -> in_channel * out_channelConnect to a server at the given address. Return a pair of buffered channels connected to the server. Remember to call Stdlib.flush on the output channel at the right times to ensure correct synchronization.
The two channels returned by open_connection share a descriptor to a socket. Therefore, when the connection is over, you should call Stdlib.close_out on the output channel, which will also close the underlying socket. Do not call Stdlib.close_in on the input channel; it will be collected by the GC eventually.
val shutdown_connection : in_channel -> unit``Shut down'' a connection established with open_connection; that is, transmit an end-of-file condition to the server reading on the other side of the connection. This does not close the socket and the channels used by the connection. See Unix.open_connection for how to close them once the connection is over.
val establish_server : (in_channel -> out_channel -> unit) -> sockaddr -> unitEstablish a server on the given address. The function given as first argument is called for each connection with two buffered channels connected to the client. A new process is created for each connection. The function establish_server never returns normally.
The two channels given to the function share a descriptor to a socket. The function does not need to close the channels, since this occurs automatically when the function returns. If the function prefers explicit closing, it should close the output channel using Stdlib.close_out and leave the input channel unclosed, for reasons explained in Unix.in_channel_of_descr.
type host_entry = {h_name : string;h_aliases : string array;h_addrtype : socket_domain;h_addr_list : inet_addr array;}Structure of entries in the hosts database.
Structure of entries in the protocols database.
Structure of entries in the services database.
val gethostbyname : string -> host_entryFind an entry in hosts with the given name.
val gethostbyaddr : inet_addr -> host_entryFind an entry in hosts with the given address.
val getprotobyname : string -> protocol_entryFind an entry in protocols with the given name.
val getprotobynumber : int -> protocol_entryFind an entry in protocols with the given protocol number.
val getservbyname : string -> string -> service_entryFind an entry in services with the given name.
val getservbyport : int -> string -> service_entryFind an entry in services with the given service number.
type addr_info = {ai_family : socket_domain;Socket domain
*)ai_socktype : socket_type;Socket type
*)ai_protocol : int;Socket protocol number
*)ai_addr : sockaddr;Address
*)ai_canonname : string;Canonical host name
*)}Address information returned by getaddrinfo.
type getaddrinfo_option = | AI_FAMILY of socket_domainImpose the given socket domain
*)| AI_SOCKTYPE of socket_typeImpose the given socket type
*)| AI_PROTOCOL of intImpose the given protocol
*)| AI_NUMERICHOSTDo not call name resolver, expect numeric IP address
*)| AI_CANONNAMEFill the ai_canonname field of the result
| AI_PASSIVEOptions to getaddrinfo.
val getaddrinfo : string -> string -> getaddrinfo_option list -> addr_info listgetaddrinfo host service opts returns a list of addr_info records describing socket parameters and addresses suitable for communicating with the given host and service. The empty list is returned if the host or service names are unknown, or the constraints expressed in opts cannot be satisfied.
host is either a host name or the string representation of an IP address. host can be given as the empty string; in this case, the ``any'' address or the ``loopback'' address are used, depending whether opts contains AI_PASSIVE. service is either a service name or the string representation of a port number. service can be given as the empty string; in this case, the port field of the returned addresses is set to 0. opts is a possibly empty list of options that allows the caller to force a particular socket domain (e.g. IPv6 only or IPv4 only) or a particular socket type (e.g. TCP only or UDP only).
type name_info = {ni_hostname : string;Name or IP address of host
*)ni_service : string;Name of service or port number
*)}Host and service information returned by getnameinfo.
Options to getnameinfo.
val getnameinfo : sockaddr -> getnameinfo_option list -> name_infogetnameinfo addr opts returns the host name and service name corresponding to the socket address addr. opts is a possibly empty list of options that governs how these names are obtained.
The following functions implement the POSIX standard terminal interface. They provide control over asynchronous communication ports and pseudo-terminals. Refer to the termios man page for a complete description.
type 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).
*)}val tcgetattr : file_descr -> terminal_ioReturn the status of the terminal referred to by the given file descriptor.
val tcsetattr : file_descr -> setattr_when -> terminal_io -> unitSet 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 -> int -> unitSend 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 -> unitWaits until all output written on the given file descriptor has been transmitted.
val tcflush : file_descr -> flush_queue -> unitDiscard 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 tcflow : file_descr -> flow_action -> unitSuspend 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.