1ThreadUnix(3)                    OCaml library                   ThreadUnix(3)
2
3
4

NAME

6       ThreadUnix - Thread-compatible system calls.
7

Module

9       Module   ThreadUnix
10

Documentation

12       Module ThreadUnix
13        : sig end
14
15
16       Deprecated.  The functionality of this module has been merged back into
17       the Unix module.  Threaded programs can now  call  the  functions  from
18       module  Unix  directly,  and  still get the correct behavior (block the
19       calling thread, if required, but  do  not  block  all  threads  in  the
20       process).
21
22
23       Thread-compatible system calls.
24
25
26
27
28
29
30
31       === Process handling ===
32
33
34       val execv : string -> string array -> unit
35
36
37
38
39       val execve : string -> string array -> string array -> unit
40
41
42
43
44       val execvp : string -> string array -> unit
45
46
47
48
49       val wait : unit -> int * Unix.process_status
50
51
52
53
54       val waitpid : Unix.wait_flag list -> int -> int * Unix.process_status
55
56
57
58
59       val system : string -> Unix.process_status
60
61
62
63
64
65       === Basic input/output ===
66
67
68       val read : Unix.file_descr -> bytes -> int -> int -> int
69
70
71
72
73       val write : Unix.file_descr -> bytes -> int -> int -> int
74
75
76
77
78       val single_write : Unix.file_descr -> bytes -> int -> int -> int
79
80
81
82
83       val write_substring : Unix.file_descr -> string -> int -> int -> int
84
85
86
87
88       val single_write_substring : Unix.file_descr -> string -> int -> int ->
89       int
90
91
92
93
94
95       === Input/output with timeout ===
96
97
98       val timed_read : Unix.file_descr -> bytes -> int -> int -> float -> int
99
100       See ThreadUnix.timed_write .
101
102
103
104       val timed_write : Unix.file_descr -> bytes -> int -> int  ->  float  ->
105       int
106
107       Behave   as   ThreadUnix.read   and   ThreadUnix.write  ,  except  that
108       Unix_error(ETIMEDOUT,_,_) is raised if no data is available for reading
109       or  ready  for  writing  after  d seconds.  The delay d is given in the
110       fifth argument, in seconds.
111
112
113
114       val timed_write_substring : Unix.file_descr -> string -> int -> int  ->
115       float -> int
116
117       See ThreadUnix.timed_write .
118
119
120
121
122       === Polling ===
123
124
125       val   select   :   Unix.file_descr  list  ->  Unix.file_descr  list  ->
126       Unix.file_descr list -> float -> Unix.file_descr list * Unix.file_descr
127       list * Unix.file_descr list
128
129
130
131
132
133       === Pipes and redirections ===
134
135
136       val pipe : ?cloexec:bool -> unit -> Unix.file_descr * Unix.file_descr
137
138
139
140
141       val open_process_in : string -> Pervasives.in_channel
142
143
144
145
146       val open_process_out : string -> Pervasives.out_channel
147
148
149
150
151       val   open_process   :   string   ->   Pervasives.in_channel  *  Perva‐
152       sives.out_channel
153
154
155
156
157       val open_process_full : string -> string array -> Pervasives.in_channel
158       * Pervasives.out_channel * Pervasives.in_channel
159
160
161
162
163
164       === Time ===
165
166
167       val sleep : int -> unit
168
169
170
171
172
173       === Sockets ===
174
175
176       val socket : ?cloexec:bool -> Unix.socket_domain -> Unix.socket_type ->
177       int -> Unix.file_descr
178
179
180
181
182       val   socketpair   :    ?cloexec:bool    ->    Unix.socket_domain    ->
183       Unix.socket_type -> int -> Unix.file_descr * Unix.file_descr
184
185
186
187
188       val  accept  :  ?cloexec:bool  ->  Unix.file_descr -> Unix.file_descr *
189       Unix.sockaddr
190
191
192
193
194       val connect : Unix.file_descr -> Unix.sockaddr -> unit
195
196
197
198
199       val recv : Unix.file_descr -> bytes -> int -> int -> Unix.msg_flag list
200       -> int
201
202
203
204
205       val  recvfrom : Unix.file_descr -> bytes -> int -> int -> Unix.msg_flag
206       list -> int * Unix.sockaddr
207
208
209
210
211       val send : Unix.file_descr -> bytes -> int -> int -> Unix.msg_flag list
212       -> int
213
214
215
216
217       val  send_substring  :  Unix.file_descr  ->  string  ->  int  -> int ->
218       Unix.msg_flag list -> int
219
220
221
222
223       val sendto : Unix.file_descr -> bytes -> int ->  int  ->  Unix.msg_flag
224       list -> Unix.sockaddr -> int
225
226
227
228
229       val  sendto_substring  :  Unix.file_descr  ->  string  -> int -> int ->
230       Unix.msg_flag list -> Unix.sockaddr -> int
231
232
233
234
235       val open_connection : Unix.sockaddr -> Pervasives.in_channel  *  Perva‐
236       sives.out_channel
237
238
239
240
241       val establish_server : (Pervasives.in_channel -> Pervasives.out_channel
242       -> unit) -> Unix.sockaddr -> unit
243
244
245
246
247
248
249OCamldoc                          2019-02-02                     ThreadUnix(3)
Impressum