module Specific: ExtUnixSpecificOnly functions available on this platformexception Not_available of string
Not_available "func" may be raised by ExtUnix.All.func
if the wrapped C function is not available on this platformval fsync : Unix.file_descr -> unitval fdatasync : Unix.file_descr -> unitval dirfd : Unix.dir_handle -> Unix.file_descrtype 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 | *) |
|
f_namemax : |
val statvfs : string -> statvfsval fstatvfs : Unix.file_descr -> statvfstype at_flag =
| |
AT_EACCESS |
| |
AT_SYMLINK_NOFOLLOW |
| |
AT_REMOVEDIR |
| |
AT_SYMLINK_FOLLOW |
val openat : Unix.file_descr ->
string -> Unix.open_flag list -> Unix.file_perm -> Unix.file_descrval fstatat : Unix.file_descr -> string -> Unix.statsval unlinkat : Unix.file_descr -> string -> at_flag list -> unitAT_REMOVEDIRval renameat : Unix.file_descr -> string -> Unix.file_descr -> string -> unitval mkdirat : Unix.file_descr -> string -> int -> unitval linkat : Unix.file_descr ->
string -> Unix.file_descr -> string -> at_flag list -> unitAT_SYMLINK_FOLLOWval symlinkat : string -> Unix.file_descr -> string -> unitmodule Uname:sig..end
sylvain@le-gall.net
val uname : unit -> Uname.t
Author: Sylvain Le Gall
Indicates that the application has no advice to
give about its access pattern for the specified
data.
The application expects to access the specified
data sequentially.
The specified data will be accessed in random
order.
The specified data will be accessed only once.
The specified data will be accessed in the near
future.
The specified data will not be accessed in the
near future.
posix_fallocate
Allocate disk space for file
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.module LargeFile:sig..end
module Ioctl:sig..end
val ttyname : Unix.file_descr -> stringval ctermid : unit -> stringval 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 realpath : string -> stringrealpath pathpathval is_open_descr : Unix.file_descr -> boolval tcgetpgrp : Unix.file_descr -> intval tcsetpgrp : Unix.file_descr -> int -> unitval 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 numbers
Author: Kaustuv Chaudhuri <kaustuv.chaudhuri@inria.fr>
signalfd ?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.
This type represents signal information that is read(2) from the
signalfd.
Blocking read(2) on a signalfd. Has undefined behaviour on
non-signalfds. Every successful read consumes a pending signal.
Functions to query the signal information structure.
Get the signal value. This form is compatible with the signal
values defined in the standard Sys module.
See signalfd(2) for the details of the remaining functions. Most
of these integers are actually unsigned.
ptrace
type which_prio_t =
| |
PRIO_PROCESS of |
(* | Priority for a process id | *) |
| |
PRIO_PGRP of |
(* | Priority for a process group id | *) |
| |
PRIO_USER of |
Author: Sylvain Le Gall <sylvain@le-gall.net>
typepriority =int
type resource =
| |
RLIMIT_CORE |
(* | Limit on size of core dump file. | *) |
| |
RLIMIT_CPU |
(* | Limit on CPU time per process. | *) |
| |
RLIMIT_DATA |
(* | Limit on data segment size. | *) |
| |
RLIMIT_FSIZE |
(* | Limit on file size. | *) |
| |
RLIMIT_NOFILE |
(* | Limit on number of open files. | *) |
| |
RLIMIT_STACK |
(* | Limit on stack size. | *) |
| |
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.val sys_exit : int -> 'aat_exit hooks (implemented in Pervasives)type mlockall_flag =
| |
MCL_CURRENT |
| |
MCL_FUTURE |
val mlockall : mlockall_flag list -> unitval munlockall : unit -> unitval strptime : string -> string -> Unix.tmExtUnixSpecific.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 -> stringExtUnixSpecific.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 isdst
Author: Niki Yoshiuchi <aplusbi@gmail.com>
val posix_openpt : Unix.open_flag list -> Unix.file_descrval grantpt : Unix.file_descr -> unitval unlockpt : Unix.file_descr -> unitval ptsname : Unix.file_descr -> stringval backtrace : unit -> string arrayval 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".