430 lines
5.6 KiB
HTML
430 lines
5.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of ThreadUnix</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>ThreadUnix</H1>
|
|
Section: OCaml library (3o)<BR>Updated: 2020-01-30<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
ThreadUnix - Thread-compatible system calls.
|
|
<A NAME="lbAC"> </A>
|
|
<H2>Module</H2>
|
|
|
|
Module ThreadUnix
|
|
<A NAME="lbAD"> </A>
|
|
<H2>Documentation</H2>
|
|
|
|
<P>
|
|
Module
|
|
<B>ThreadUnix</B>
|
|
|
|
<BR> :
|
|
<B>sig end</B>
|
|
|
|
<P>
|
|
<P>
|
|
<B>Deprecated.</B>
|
|
|
|
The functionality of this module has been merged back into
|
|
the
|
|
<B>Unix</B>
|
|
|
|
module. Threaded programs can now call the functions
|
|
from module
|
|
<B>Unix</B>
|
|
|
|
directly, and still get the correct behavior
|
|
(block the calling thread, if required, but do not block all threads
|
|
in the process).
|
|
<P>
|
|
<P>
|
|
Thread-compatible system calls.
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H3>Process handling</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<P>
|
|
<I>val execv </I>
|
|
|
|
:
|
|
<B>string -> string array -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val execve </I>
|
|
|
|
:
|
|
<B>string -> string array -> string array -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val execvp </I>
|
|
|
|
:
|
|
<B>string -> string array -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val wait </I>
|
|
|
|
:
|
|
<B>unit -> int * Unix.process_status</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val waitpid </I>
|
|
|
|
:
|
|
<B>Unix.wait_flag list -> int -> int * Unix.process_status</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val system </I>
|
|
|
|
:
|
|
<B>string -> Unix.process_status</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Basic input/output</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<P>
|
|
<I>val read </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> bytes -> int -> int -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val write </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> bytes -> int -> int -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val write_substring </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> string -> int -> int -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Input/output with timeout</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<P>
|
|
<I>val timed_read </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> bytes -> int -> int -> float -> int</B>
|
|
|
|
<P>
|
|
See
|
|
<B>ThreadUnix.timed_write</B>
|
|
|
|
.
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val timed_write </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> bytes -> int -> int -> float -> int</B>
|
|
|
|
<P>
|
|
Behave as
|
|
<B>ThreadUnix.read</B>
|
|
|
|
and
|
|
<B>ThreadUnix.write</B>
|
|
|
|
, except that
|
|
<B>Unix_error(ETIMEDOUT,_,_)</B>
|
|
|
|
is raised if no data is
|
|
available for reading or ready for writing after
|
|
<B>d</B>
|
|
|
|
seconds.
|
|
The delay
|
|
<B>d</B>
|
|
|
|
is given in the fifth argument, in seconds.
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val timed_write_substring </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> string -> int -> int -> float -> int</B>
|
|
|
|
<P>
|
|
See
|
|
<B>ThreadUnix.timed_write</B>
|
|
|
|
.
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Polling</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<P>
|
|
<I>val select </I>
|
|
|
|
:
|
|
<B>Unix.file_descr list -></B>
|
|
|
|
<B>Unix.file_descr list -></B>
|
|
|
|
<B>Unix.file_descr list -></B>
|
|
|
|
<B>float -> Unix.file_descr list * Unix.file_descr list * Unix.file_descr list</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H3>Pipes and redirections</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<P>
|
|
<I>val pipe </I>
|
|
|
|
:
|
|
<B>?cloexec:bool -> unit -> Unix.file_descr * Unix.file_descr</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val open_process_in </I>
|
|
|
|
:
|
|
<B>string -> in_channel</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val open_process_out </I>
|
|
|
|
:
|
|
<B>string -> out_channel</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val open_process </I>
|
|
|
|
:
|
|
<B>string -> in_channel * out_channel</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H3>Time</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<P>
|
|
<I>val sleep </I>
|
|
|
|
:
|
|
<B>int -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H3>Sockets</H3>
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<P>
|
|
<I>val socket </I>
|
|
|
|
:
|
|
<B>?cloexec:bool -></B>
|
|
|
|
<B>Unix.socket_domain -> Unix.socket_type -> int -> Unix.file_descr</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val accept </I>
|
|
|
|
:
|
|
<B>?cloexec:bool -> Unix.file_descr -> Unix.file_descr * Unix.sockaddr</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val connect </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> Unix.sockaddr -> unit</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val recv </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> bytes -> int -> int -> Unix.msg_flag list -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val recvfrom </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -></B>
|
|
|
|
<B>bytes -> int -> int -> Unix.msg_flag list -> int * Unix.sockaddr</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val send </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> bytes -> int -> int -> Unix.msg_flag list -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val send_substring </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -> string -> int -> int -> Unix.msg_flag list -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val sendto </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -></B>
|
|
|
|
<B>bytes -> int -> int -> Unix.msg_flag list -> Unix.sockaddr -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val sendto_substring </I>
|
|
|
|
:
|
|
<B>Unix.file_descr -></B>
|
|
|
|
<B>string -> int -> int -> Unix.msg_flag list -> Unix.sockaddr -> int</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<I>val open_connection </I>
|
|
|
|
:
|
|
<B>Unix.sockaddr -> in_channel * out_channel</B>
|
|
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">Module</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">Documentation</A><DD>
|
|
<DL>
|
|
<DT id="4"><A HREF="#lbAE">Process handling</A><DD>
|
|
<DT id="5"><A HREF="#lbAF">Basic input/output</A><DD>
|
|
<DT id="6"><A HREF="#lbAG">Input/output with timeout</A><DD>
|
|
<DT id="7"><A HREF="#lbAH">Polling</A><DD>
|
|
<DT id="8"><A HREF="#lbAI">Pipes and redirections</A><DD>
|
|
<DT id="9"><A HREF="#lbAJ">Time</A><DD>
|
|
<DT id="10"><A HREF="#lbAK">Sockets</A><DD>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:58 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|