module All: ExtUnixAllNot_available
with function name as an argumentexception Not_available of string
Not_available "symbol" may be raised by ExtUnix.All.func
if the wrapped C function or constant is not available on this platform.
ExtUnix.Specific includes only functions available on the current
platform and will not raise Not_available.
Note that libc wrappers underlying ExtUnix.Specific functions may still raise
ENOSYS (Not implemented) error even though the function is available.
type('a, 'b)carray =('a, 'b, Bigarray.c_layout) Bigarray.Array1.t
Bigarray.c_layout. Naming: "bigarray with C layout" -> "carray".type'acarray8 =('a, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
Bigarray.c_layout,
2. bigarray contains 8-bit integers. Naming: "bigarray with C layout
and 8-bit elements" -> "carray8".typeopen_flag =Unix.open_flag
val eventfd : int -> Unix.file_descr
val eventfd_read : Unix.file_descr -> int64
val eventfd_write : Unix.file_descr -> int64 -> unit
module Syslog:sig..end
module Uname:sig..end
sylvain@le-gall.net
val uname : unit -> Uname.tval fsync : Unix.file_descr -> unitval fdatasync : Unix.file_descr -> unit
val sync : unit -> unitval syncfs : Unix.file_descr -> unitExtUnixAll.sync, but synchronizes just the file system containing file referred to by the open file descriptor fdval dirfd : Unix.dir_handle -> Unix.file_descr
type st_flag =
| |
ST_RDONLY |
| |
ST_NOSUID |
| |
ST_NODEV |
| |
ST_NOEXEC |
| |
ST_SYNCHRONOUS |
| |
ST_MANDLOCK |
| |
ST_WRITE |
| |
ST_APPEND |
| |
ST_IMMUTABLE |
| |
ST_NOATIME |
| |
ST_NODIRATIME |
| |
ST_RELATIME |
type statvfs = {
|
f_bsize : |
(* |
file system block size
| *) |
|
f_blocks : |
(* |
size of file system in blocks
| *) |
|
f_bfree : |
(* |
free blocks
| *) |
|
f_bavail : |
(* |
free blocks for unprivileged users
| *) |
|
f_files : |
(* |
inodes
| *) |
|
f_ffree : |
(* |
free inodes
| *) |
|
f_favail : |
(* |
free inodes for unprivileged users
| *) |
|
f_fsid : |
(* |
file system ID
| *) |
|
f_flag : |
(* |
mount flags (raw value)
| *) |
|
f_flags : |
(* |
mount flags (decoded)
| *) |
|
f_namemax : |
val statvfs : string -> statvfsval fstatvfs : Unix.file_descr -> statvfs
type at_flag =
| |
AT_EACCESS |
| |
AT_SYMLINK_NOFOLLOW |
| |
AT_REMOVEDIR |
| |
AT_SYMLINK_FOLLOW |
| |
AT_NO_AUTOMOUNT |
val openat : Unix.file_descr ->
string -> open_flag list -> Unix.file_perm -> Unix.file_descr
val fstatat : Unix.file_descr -> string -> at_flag list -> Unix.statsAT_SYMLINK_NOFOLLOW AT_NO_AUTOMOUNTval unlinkat : Unix.file_descr -> string -> at_flag list -> unitAT_REMOVEDIRval renameat : Unix.file_descr -> string -> Unix.file_descr -> string -> unit
val mkdirat : Unix.file_descr -> string -> int -> unit
val linkat : Unix.file_descr ->
string -> Unix.file_descr -> string -> at_flag list -> unitAT_SYMLINK_FOLLOWval symlinkat : string -> Unix.file_descr -> string -> unit
val readlinkat : Unix.file_descr -> string -> string
val fchownat : Unix.file_descr -> string -> int -> int -> at_flag list -> unit
val fchmodat : Unix.file_descr -> string -> int -> at_flag list -> unit
val int_of_file_descr : Unix.file_descr -> intNot_available if OS does not represent file descriptors as numbersval file_descr_of_int : int -> Unix.file_descrNot_available if OS does not represent file descriptors as numbersval is_open_descr : Unix.file_descr -> boolval realpath : string -> stringrealpath pathpath
Author: Sylvain Le Gall
type advice =
| |
POSIX_FADV_NORMAL |
| |
POSIX_FADV_SEQUENTIAL |
| |
POSIX_FADV_RANDOM |
| |
POSIX_FADV_NOREUSE |
| |
POSIX_FADV_WILLNEED |
| |
POSIX_FADV_DONTNEED |
val fadvise : Unix.file_descr -> int -> int -> advice -> unit
Author: Sylvain Le Gall
val fallocate : Unix.file_descr -> int -> int -> unitfallocate fd off len allocates disk space to ensure that subsequent writes
between off and off + len in fd will not fail because of lack of disk
space. The file size is modified if off + len is bigger than the current size.
Author: Goswin von Brederlow
val unsafe_all_pread : Unix.file_descr -> int -> Bytes.t -> int -> int -> intall_pread fd off buf ofs len reads up to len bytes from file
descriptor fd at offset off (from the start of the file) into
the string buf at offset ofs. The file offset is not changed.
all_pread repeats the read operation until all characters have
been read or an error occurs. Returns less than the number of
characters requested on EAGAIN, EWOULDBLOCK or End-of-file but
only ever returns 0 on End-of-file. Continues the read operation
on EINTR. Raises an Unix.Unix_error exception in all other
cases.
val all_pread : Unix.file_descr -> int -> bytes -> int -> int -> int
val unsafe_single_pread : Unix.file_descr -> int -> Bytes.t -> int -> int -> intsingle_pread fd off buf ifs len reads up to len bytes from
file descriptor fd at offset off (from the start of the file)
into the string buf at offset ofs. The file offset is not
changed.
single_pread attempts to read only once. Returns the number of
characters read or raises an Unix.Unix_error exception.
val single_pread : Unix.file_descr -> int -> bytes -> int -> int -> int
val unsafe_pread : Unix.file_descr -> int -> Bytes.t -> int -> int -> intpread fd off buf ofs len reads up to len bytes from file
descriptor fd at offset off (from the start of the file) into
the string buf at offset ofs. The file offset is not changed.
pread repeats the read operation until all characters have
been read or an error occurs. Raises an Unix.Unix_error exception
if 0 characters could be read before an error occurs. Continues
the read operation on EINTR. Returns the number of characters
written in all other cases.
val pread : Unix.file_descr -> int -> bytes -> int -> int -> int
val unsafe_intr_pread : Unix.file_descr -> int -> Bytes.t -> int -> int -> intintr_pread fd off buf ofs len reads up to len bytes from file
descriptor fd at offset off (from the start of the file) into
the string buf at offset ofs. The file offset is not changed.
intr_pread repeats the read operation until all characters have
been read or an error occurs. Raises an Unix.Unix_error exception
if 0 characters could be read before an error occurs. Does NOT
continue on EINTR. Returns the number of characters written in all
other cases.
val intr_pread : Unix.file_descr -> int -> bytes -> int -> int -> int
Author: Goswin von Brederlow
val unsafe_all_pwrite : Unix.file_descr -> int -> string -> int -> int -> intall_pwrite fd off buf ofs len writes up to len bytes from file
descriptor fd at offset off (from the start of the file) into
the string buf at offset ofs. The file offset is not changed.
all_pwrite repeats the write operation until all characters have
been written or an error occurs. Returns less than the number of
characters requested on EAGAIN, EWOULDBLOCK but never 0. Continues
the write operation on EINTR. Raises an Unix.Unix_error exception
in all other cases.
val all_pwrite : Unix.file_descr -> int -> string -> int -> int -> int
val unsafe_single_pwrite : Unix.file_descr -> int -> string -> int -> int -> intsingle_pwrite fd off buf ofs len writes up to len bytes from
file descriptor fd at offset off (from the start of the file)
into the string buf at offset ofs. The file offset is not
changed.
single_pwrite attempts to write only once. Returns the number of
characters written or raises an Unix.Unix_error exception.
val single_pwrite : Unix.file_descr -> int -> string -> int -> int -> int
val unsafe_pwrite : Unix.file_descr -> int -> string -> int -> int -> intpwrite fd off buf ofs len writes up to len bytes from file
descriptor fd at offset off (from the start of the file) into
the string buf at offset ofs. The file offset is not changed.
pwrite repeats the write operation until all characters have
been written or an error occurs. Raises an Unix.Unix_error exception
if 0 characters could be written before an error occurs. Continues
the write operation on EINTR. Returns the number of characters
written in all other cases.
val pwrite : Unix.file_descr -> int -> string -> int -> int -> int
val unsafe_intr_pwrite : Unix.file_descr -> int -> string -> int -> int -> intintr_pwrite fd off buf ofs len writes up to len bytes from
file descriptor fd at offset off (from the start of the file)
into the string buf at offset ofs. The file offset is not
changed.
intr_pwrite repeats the write operation until all characters have
been written or an error occurs. Raises an Unix.Unix_error exception
if 0 characters could be written before an error occurs. Does NOT
continue on EINTR. Returns the number of characters written in all
other cases.
val intr_pwrite : Unix.file_descr -> int -> string -> int -> int -> int
Author: Goswin von Brederlow
val unsafe_all_read : Unix.file_descr -> Bytes.t -> int -> int -> intall_read fd buf ofs len reads up to len bytes from file
descriptor fd into the string buf at offset ofs.
all_read repeats the read operation until all characters have
been read or an error occurs. Returns less than the number of
characters requested on EAGAIN, EWOULDBLOCK or End-of-file but
only ever returns 0 on End-of-file. Continues the read operation
on EINTR. Raises an Unix.Unix_error exception in all other
cases.
val all_read : Unix.file_descr -> bytes -> int -> int -> int
val unsafe_single_read : Unix.file_descr -> Bytes.t -> int -> int -> intsingle_read fd buf ifs len reads up to len bytes from file
descriptor fd into the string buf at offset ofs.
single_read attempts to read only once. Returns the number of
characters read or raises an Unix.Unix_error exception.
val single_read : Unix.file_descr -> bytes -> int -> int -> int
val unsafe_read : Unix.file_descr -> Bytes.t -> int -> int -> intread fd buf ofs len reads up to len bytes from file descriptor
fd into the string buf at offset ofs.
read repeats the read operation until all characters have
been read or an error occurs. Raises an Unix.Unix_error exception
if 0 characters could be read before an error occurs. Continues
the read operation on EINTR. Returns the number of characters
written in all other cases.
val read : Unix.file_descr -> bytes -> int -> int -> int
val unsafe_intr_read : Unix.file_descr -> Bytes.t -> int -> int -> intintr_read fd buf ofs len reads up to len bytes from file
descriptor fd into the string buf at offset ofs.
intr_read repeats the read operation until all characters have
been read or an error occurs. Raises an Unix.Unix_error exception
if 0 characters could be read before an error occurs. Does NOT
continue on EINTR. Returns the number of characters written in all
other cases.
val intr_read : Unix.file_descr -> bytes -> int -> int -> int
Author: Goswin von Brederlow
val unsafe_all_write : Unix.file_descr -> string -> int -> int -> intall_write fd buf ofs len writes up to len bytes from file
descriptor fd into the string buf at offset ofs.
all_write repeats the write operation until all characters have
been written or an error occurs. Returns less than the number of
characters requested on EAGAIN, EWOULDBLOCK but never 0. Continues
the write operation on EINTR. Raises an Unix.Unix_error exception
in all other cases.
val all_write : Unix.file_descr -> string -> int -> int -> int
val unsafe_single_write : Unix.file_descr -> string -> int -> int -> intsingle_write fd buf ofs len writes up to len bytes from file
descriptor fd into the string buf at offset ofs.
single_write attempts to write only once. Returns the number of
characters written or raises an Unix.Unix_error exception.
val single_write : Unix.file_descr -> string -> int -> int -> int
val unsafe_write : Unix.file_descr -> string -> int -> int -> intwrite fd buf ofs len writes up to len bytes from file
descriptor fd into the string buf at offset ofs.
write repeats the write operation until all characters have
been written or an error occurs. Raises an Unix.Unix_error exception
if 0 characters could be written before an error occurs. Continues
the write operation on EINTR. Returns the number of characters
written in all other cases.
val write : Unix.file_descr -> string -> int -> int -> int
val unsafe_intr_write : Unix.file_descr -> string -> int -> int -> intintr_write fd buf ofs len writes up to len bytes from file
descriptor fd into the string buf at offset ofs.
intr_write repeats the write operation until all characters have
been written or an error occurs. Raises an Unix.Unix_error exception
if 0 characters could be written before an error occurs. Does NOT
continue on EINTR. Returns the number of characters written in all
other cases.
val intr_write : Unix.file_descr -> string -> int -> int -> intmodule LargeFile:sig..end
type mount_flag =
| |
MS_RDONLY |
| |
MS_NOSUID |
| |
MS_NODEV |
| |
MS_NOEXEC |
| |
MS_SYNCHRONOUS |
| |
MS_REMOUNT |
| |
MS_MANDLOCK |
| |
MS_DIRSYNC |
| |
MS_NOATIME |
| |
MS_NODIRATIME |
| |
MS_BIND |
| |
MS_MOVE |
| |
MS_REC |
| |
MS_SILENT |
| |
MS_POSIXACL |
| |
MS_UNBINDABLE |
| |
MS_PRIVATE |
| |
MS_SLAVE |
| |
MS_SHARED |
| |
MS_RELATIME |
| |
MS_KERNMOUNT |
| |
MS_I_VERSION |
| |
MS_STRICTATIME |
| |
MS_NOUSER |
val mount : source:string ->
target:string ->
fstype:string -> mount_flag list -> data:string -> unit
type umount2_flag =
| |
MNT_FORCE |
| |
MNT_DETACH |
| |
MNT_EXPIRE |
| |
UMOUNT_NOFOLLOW |
val umount2 : string -> umount2_flag list -> unit
val chroot : string -> unittype clone_flag =
| |
CLONE_FS |
| |
CLONE_FILES |
| |
CLONE_NEWNS |
| |
CLONE_SYSVSEM |
| |
CLONE_NEWUTS |
| |
CLONE_NEWIPC |
| |
CLONE_NEWUSER |
| |
CLONE_NEWPID |
| |
CLONE_NEWNET |
: clone_flag list -> unitmodule Ioctl:sig..end
val ttyname : Unix.file_descr -> stringval ctermid : unit -> stringval gettid : unit -> intval setpgid : int -> int -> unitsetpgid pid pgid sets the process group of the process specified by pid to pgid.
If pid is zero, then the process ID of the calling process is used. If
pgid is zero, then the PGID of the process specified by pid is made the same as its process ID.val getpgid : int -> intgetpgid pid returns the PGID of the process specified by pid.
If pid is zero, the process ID of the calling process is used.val getsid : int -> intgetsid pid returns the session ID of the process specified by pid.
If pid is zero, the process ID of the calling process is used.val setreuid : int -> int -> unitsetreuid ruid euid sets real and effective user IDs of the calling process.
Supplying a value of -1 for either the real or effective user ID forces the system to leave that ID unchanged.val setregid : int -> int -> unitsetregid rgid egid sets real and effective group IDs of the calling process.
Supplying a value of -1 for either the real or effective group ID forces the system to leave that ID unchanged.val setresuid : int -> int -> int -> unitsetresuid ruid euid suid sets real, effective and saved user IDs of the calling process.
Supplying a value of -1 for either the real or effective user ID forces the system to leave that ID unchanged.val setresgid : int -> int -> int -> unitsetresgid rgid egid sgid sets real, effective and saved group IDs of the calling process.
Supplying a value of -1 for either the real or effective group ID forces the system to leave that ID unchanged.val tcgetpgrp : Unix.file_descr -> int
val tcsetpgrp : Unix.file_descr -> int -> unit
val sys_exit : int -> 'aat_exit hooks (implemented in Pervasives)type sysinfo = {
|
uptime : |
(* |
Seconds since boot
| *) |
|
loads : |
(* |
1, 5, and 15 minute load averages
| *) |
|
totalram : |
(* |
Total usable main memory size
| *) |
|
freeram : |
(* |
Available memory size
| *) |
|
: |
(* |
Amount of shared memory
| *) |
|
bufferram : |
(* |
Memory used by buffers
| *) |
|
totalswap : |
(* |
Total swap space size
| *) |
|
freeswap : |
(* |
swap space still available
| *) |
|
procs : |
(* |
Number of current processes
| *) |
|
totalhigh : |
(* |
Total high memory size
| *) |
|
freehigh : |
(* |
Available high memory size
| *) |
|
mem_unit : |
mem_unit bytesval sysinfo : unit -> sysinfoval uptime : unit -> intval getifaddrs : unit -> (string * string) listPF_INET interfaces and corresponding addresses (may change)type socket_int_option_ =
| |
TCP_KEEPCNT_ |
| |
TCP_KEEPIDLE_ |
| |
TCP_KEEPINTVL_ |
| |
SO_REUSEPORT_ |
| |
SO_ATTACH_BPF_ |
| |
SO_ATTACH_REUSEPORT_EBPF_ |
| |
SO_DETACH_FILTER_ |
| |
SO_DETACH_BPF_ |
| |
SO_LOCK_FILTER_ |
val string_of_socket_int_option_ : socket_int_option_ -> string
val setsockopt_int : Unix.file_descr -> socket_int_option_ -> int -> unit
val getsockopt_int : Unix.file_descr -> socket_int_option_ -> int
val have_sockopt_int : socket_int_option_ -> bool
type socket_int_option =
| |
TCP_KEEPCNT |
| |
TCP_KEEPIDLE |
| |
TCP_KEEPINTVL |
| |
SO_ATTACH_BPF |
| |
SO_ATTACH_REUSEPORT_EBPF |
Unix module.
NB Not all options available on all platforms, use ExtUnixAll.have_sockopt to check at runtime
(even when function is defined in Specific module)type socket_bool_option =
| |
SO_REUSEPORT |
| |
SO_LOCK_FILTER |
type socket_unit_option =
| |
SO_DETACH_FILTER |
| |
SO_DETACH_BPF |
val make_socket_int_option : socket_int_option -> socket_int_option_val make_socket_bool_option : socket_bool_option -> socket_int_option_
val make_socket_unit_option : socket_unit_option -> socket_int_option_
val have_sockopt_unit : socket_unit_option -> bool
val have_sockopt_bool : socket_bool_option -> bool
val have_sockopt_int : socket_int_option -> bool
val have_sockopt : socket_int_option -> boolval setsockopt_int : Unix.file_descr -> socket_int_option -> int -> unit
val getsockopt_int : Unix.file_descr -> socket_int_option -> int
val setsockopt_unit : Unix.file_descr -> socket_unit_option -> unitval setsockopt : Unix.file_descr -> socket_bool_option -> bool -> unitval getsockopt : Unix.file_descr -> socket_bool_option -> boolval setsockopt_int : Unix.file_descr -> socket_int_option -> int -> unitval getsockopt_int : Unix.file_descr -> socket_int_option -> intmodule Poll:sig..end
val poll : (Unix.file_descr * Poll.t) array ->
int -> float -> (Unix.file_descr * Poll.t) list
val poll : (Unix.file_descr * Poll.t) array ->
?n:int -> float -> (Unix.file_descr * Poll.t) list
Author: Kaustuv Chaudhuri <kaustuv.chaudhuri@inria.fr>
val signalfd : ?fd:Unix.file_descr ->
sigs:int list -> flags:int list -> unit -> Unix.file_descrsignalfd ?fd sigs flags ()
If the first optional argument is omitted, then a new file descriptor is allocated.
Otherwise, the given file descriptor is modified (in which case it
must have been created with signalfd previously). When you are
done with the fd, remember to Unix.close it. Do not forget
to block sigs with Unix.sigprocmask to prevent signal handling
according to default dispositions.type ssi
val signalfd_read : Unix.file_descr -> ssival ssi_signo_sys : ssi -> intSys module.
See signalfd(2) for the details of the remaining functions. Most
of these integers are actually unsigned.
val ssi_signo : ssi -> int32
val ssi_errno : ssi -> int32
val ssi_code : ssi -> int32
val ssi_pid : ssi -> int32
val ssi_uid : ssi -> int32
val ssi_fd : ssi -> Unix.file_descr
val ssi_tid : ssi -> int32
val ssi_band : ssi -> int32
val ssi_overrun : ssi -> int32
val ssi_trapno : ssi -> int32
val ssi_status : ssi -> int32
val ssi_int : ssi -> int32
val ssi_ptr : ssi -> int64
val ssi_utime : ssi -> int64
val ssi_stime : ssi -> int64
val ssi_addr : ssi -> int64
Author: Sylvain Le Gall <sylvain@le-gall.net>
type which_prio_t =
| |
PRIO_PROCESS of |
| |
PRIO_PGRP of |
| |
PRIO_USER of |
typepriority =int
type resource =
| |
RLIMIT_CORE |
| |
RLIMIT_CPU |
| |
RLIMIT_DATA |
| |
RLIMIT_FSIZE |
| |
RLIMIT_NOFILE |
| |
RLIMIT_STACK |
| |
RLIMIT_AS |
val string_of_resource : resource -> stringmodule Rlimit:sig..end
val getpriority : which_prio_t -> priorityval setpriority : which_prio_t -> priority -> unitval getrlimit : resource -> Rlimit.t * Rlimit.t(soft,hard) limitsval setrlimit : resource ->
soft:Rlimit.t -> hard:Rlimit.t -> unitgetrusage is not implemented because the only meaningful information it
provides are ru_utime and ru_stime which can be accessed through
Unix.times.type mlockall_flag =
| |
MCL_CURRENT |
| |
MCL_FUTURE |
val mlockall : mlockall_flag list -> unitval munlockall : unit -> unitval memalign : int -> int -> Bigarray.int8_unsigned_elt carray8memalign alignment size creates a Bigarray.Array1.t of size bytes,
which data is aligned to alignment (must be a power of 2)
Author: Goswin von Brederlow
val strptime : string -> string -> Unix.tmExtUnixAll.strftime function.
strptime fmt data convert a string containing time information data
into a tm struct according to the format specified by fmt.val asctime : Unix.tm -> stringtm argument. The
ascii time is returned in the form of a string like
'Wed Jun 30, 21:21:21 2005\n'val strftime : string -> Unix.tm -> stringExtUnixAll.strptime function.
strftime fmt data convert a a tm structure data into a string
according to the format specified by fmt.val tzname : bool -> stringtzname isdstval timezone : unit -> int * boolval timegm : Unix.tm -> floatUnix.gmtime
Author: Niki Yoshiuchi <aplusbi@gmail.com>
val posix_openpt : open_flag list -> Unix.file_descrval grantpt : Unix.file_descr -> unitval unlockpt : Unix.file_descr -> unitval ptsname : Unix.file_descr -> stringval backtrace : unit -> string array
NB native function backtrace may fail to unwind the OCaml callstack
correctly or even segfault. Do not use lightly.
See bug #1290,
PR#5344
and Debian bug #637380 for details.
val malloc_stats : unit -> unitval malloc_info : unit -> stringval mtrace : unit -> unit
val muntrace : unit -> unit
val ptrace_traceme : unit -> unit
val ptrace_peekdata : int -> nativeint -> nativeint
val ptrace_peektext : int -> nativeint -> nativeint
type ptrace_request =
| |
PTRACE_ATTACH |
| |
PTRACE_DETACH |
val ptrace : int -> ptrace_request -> unitval setenv : string -> string -> bool -> unitsetenv name value overwrite adds the variable name to the environment with the value value, if name
does not already exist or overwrite is trueval unsetenv : string -> unitunsetenv name removes variable name from the environment. If name does not exist in the environment, then the function
succeeds, and the environment is unchanged.val clearenv : unit -> unitval mkdtemp : string -> stringmkdtemp template creates a unique temporary directory (with permissions 0700).
Last six characters of template must be "XXXXXX".val mkstemp : ?suffix:string -> string -> Unix.file_descr * stringmkstemp ?(suffix="") prefix generates a unique temporary
filename in the form prefixXXXXXXsuffix, creates and opens the
file, and returns an open file descriptor and name for the
file.val mkostemp : ?suffix:string ->
?flags:open_flag list -> string -> Unix.file_descr * stringmkostemp ?(suffix="") ?(flags=[]) prefix generates a unique temporary
filename in the form prefixXXXXXXsuffix, creates and opens the
file with flags, and returns an open file descriptor and name
for the file.module BigEndian:sig..end
module LittleEndian:sig..end
module HostEndian:sig..end
Author: Andre Nathan
val read_credentials : Unix.file_descr -> int * int * int
Author: Andre Nathan
val fexecve : Unix.file_descr -> string array -> string array -> 'afexecve fd args env executes the program in file represented by
file descriptor fd with arguments args and environment
variables given by env. As with the execv* functions, on
success fexecve never returns; the current process is replaced
by the new one.
Author: Andre Nathan
val sendmsg : Unix.file_descr -> ?sendfd:Unix.file_descr -> string -> unitval recvmsg_fd : Unix.file_descr -> Unix.file_descr option * stringval sendfd : sock:Unix.file_descr -> fd:Unix.file_descr -> unitsendfd sock fd sends a file descriptor fd through a UNIX domain socket sock.
This will send a sentinel message at the same time, otherwise ExtUnixAll.sendmsg will not pass the file descriptor.val recvfd : Unix.file_descr -> Unix.file_descrexception Recvfd of Unix.file_descr * string
val recvmsg : Unix.file_descr -> string
val recvmsg_nofd : Unix.file_descr -> string
Author: Roman Vorobets
type sysconf_name =
| |
ARG_MAX |
| |
CHILD_MAX |
| |
HOST_NAME_MAX |
| |
LOGIN_NAME_MAX |
| |
CLK_TCK |
| |
OPEN_MAX |
| |
PAGESIZE |
| |
RE_DUP_MAX |
| |
STREAM_MAX |
| |
SYMLOOP_MAX |
| |
TTY_NAME_MAX |
| |
TZNAME_MAX |
| |
POSIX_VERSION |
| |
LINE_MAX |
| |
POSIX2_VERSION |
| |
PHYS_PAGES |
| |
AVPHYS_PAGES |
| |
NPROCESSORS_CONF |
| |
NPROCESSORS_ONLN |
val sysconf : sysconf_name -> int64val sysconf : sysconf_name -> int64Not_available for non-standard options (see above)
even in Specific module
Author: Pierre Chambart <pierre.chambart@ocamlpro.com>
type splice_flag =
| |
SPLICE_F_MOVE |
| |
SPLICE_F_NONBLOCK |
| |
SPLICE_F_MORE |
| |
SPLICE_F_GIFT |
Only use for vmsplice.
val splice : Unix.file_descr ->
int option ->
Unix.file_descr -> int option -> int -> splice_flag list -> intsplice fd_in off_in fd_out off_out len flags moves data between two file
descriptors without copying between kernel address space and user address
space. It transfers up to len bytes of data from the file descriptor
fd_in to the file descriptor fd_out, where one of the descriptors
must refer to a pipe.
If fd_in refers to a pipe, then off_in must be None. If fd_in does
not refer to a pipe and off_in is None, then bytes are read from fd_in
starting from the current file offset, and the current file offset is
adjusted appropriately. If fd_in does not refer to a pipe and off_in
is Some n, then n mspecifies the starting offset from which bytes will
be read from fd_in; in this case, the current file offset of fd_in is not
changed. Analogous statements apply for fd_out and off_out.
Returns the number of bytes spliced to or from the pipe. A return value of 0
means that there was no data to transfer, and it would not make sense to
block, because there are no writers connected to the write end of the pipe
referred to by fd_in.
val tee : Unix.file_descr ->
Unix.file_descr -> int -> splice_flag list -> inttee fd_in fd_out len flags duplicates up to len bytes of data from the
pipe fd_in to the pipe fd_out. It does not consume the data that is
duplicated from fd_in; therefore, that data can be copied by a subsequent
splice.module BA:sig..end
val have : string -> bool optionhave namename is availableSome true if availableSome false if not availableNone if not knownhave "eventfd"