`sig
val int_of_file_descr : Unix.file_descr -> int
val file_descr_of_int : int -> Unix.file_descr
external sysconf_open_max : unit -> int = "netsys_sysconf_open_max"
external get_nonblock : Unix.file_descr -> bool = "netsys_get_nonblock"
external fchdir : Unix.file_descr -> unit = "netsys_fchdir"
external fdopendir : Unix.file_descr -> Unix.dir_handle
= "netsys_fdopendir"
external realpath : string -> string = "netsys_realpath"
external getpgid : int -> int = "netsys_getpgid"
val getpgrp : unit -> int
external setpgid : int -> int -> unit = "netsys_setpgid"
val setpgrp : unit -> unit
external tcgetpgrp : Unix.file_descr -> int = "netsys_tcgetpgrp"
external tcsetpgrp : Unix.file_descr -> int -> unit = "netsys_tcsetpgrp"
external ctermid : unit -> string = "netsys_ctermid"
external ttyname : Unix.file_descr -> string = "netsys_ttyname"
external getsid : int -> int = "netsys_getsid"
val with_tty : (Unix.file_descr -> unit) -> unit
val tty_read_password : ?tty:Unix.file_descr -> string -> string
external posix_openpt : bool -> Unix.file_descr = "netsys_posix_openpt"
external grantpt : Unix.file_descr -> unit = "netsys_grantpt"
external unlockpt : Unix.file_descr -> unit = "netsys_unlockpt"
external ptsname : Unix.file_descr -> string = "netsys_ptsname"
type node_type =
S_IFREG
| S_IFCHR of int
| S_IFBLK of int
| S_IFIFO
| S_IFSOCK
external mknod : string -> int -> Netsys_posix.node_type -> unit
= "netsys_mknod"
external setreuid : int -> int -> unit = "netsys_setreuid"
external setregid : int -> int -> unit = "netsys_setregid"
external initgroups : string -> int -> unit = "netsys_initgroups"
val have_at : unit -> bool
val at_fdcwd : Unix.file_descr
type at_flag =
AT_EACCESS
| AT_SYMLINK_NOFOLLOW
| AT_SYMLINK_FOLLOW
| AT_REMOVEDIR
val openat :
Unix.file_descr ->
string -> Unix.open_flag list -> Unix.file_perm -> Unix.file_descr
val faccessat :
Unix.file_descr ->
string ->
Unix.access_permission list -> Netsys_posix.at_flag list -> unit
val mkdirat : Unix.file_descr -> string -> int -> unit
val renameat :
Unix.file_descr -> string -> Unix.file_descr -> string -> unit
val linkat :
Unix.file_descr ->
string -> Unix.file_descr -> string -> Netsys_posix.at_flag list -> unit
val unlinkat :
Unix.file_descr -> string -> Netsys_posix.at_flag list -> unit
val symlinkat : string -> Unix.file_descr -> string -> unit
val mkfifoat : Unix.file_descr -> string -> int -> unit
val readlinkat : Unix.file_descr -> string -> string
type poll_array
type poll_req_events
type poll_act_events
type poll_cell = {
mutable poll_fd : Unix.file_descr;
mutable poll_req_events : Netsys_posix.poll_req_events;
mutable poll_act_events : Netsys_posix.poll_act_events;
}
val have_poll : unit -> bool
val poll_req_events : bool -> bool -> bool -> Netsys_posix.poll_req_events
val poll_req_triple : Netsys_posix.poll_req_events -> bool * bool * bool
val poll_null_events : unit -> Netsys_posix.poll_act_events
val poll_result : Netsys_posix.poll_act_events -> bool
val poll_rd_result : Netsys_posix.poll_act_events -> bool
val poll_wr_result : Netsys_posix.poll_act_events -> bool
val poll_pri_result : Netsys_posix.poll_act_events -> bool
val poll_err_result : Netsys_posix.poll_act_events -> bool
val poll_hup_result : Netsys_posix.poll_act_events -> bool
val poll_nval_result : Netsys_posix.poll_act_events -> bool
val create_poll_array : int -> Netsys_posix.poll_array
val set_poll_cell :
Netsys_posix.poll_array -> int -> Netsys_posix.poll_cell -> unit
val get_poll_cell :
Netsys_posix.poll_array -> int -> Netsys_posix.poll_cell
val blit_poll_array :
Netsys_posix.poll_array ->
int -> Netsys_posix.poll_array -> int -> int -> unit
val poll_array_length : Netsys_posix.poll_array -> int
val poll : Netsys_posix.poll_array -> int -> float -> int
val restarting_poll : Netsys_posix.poll_array -> int -> float -> int
val poll_single : Unix.file_descr -> bool -> bool -> bool -> float -> bool
val int_of_req_events : Netsys_posix.poll_req_events -> int
val int_of_act_events : Netsys_posix.poll_act_events -> int
val req_events_of_int : int -> Netsys_posix.poll_req_events
val act_events_of_int : int -> Netsys_posix.poll_act_events
val const_rd_event : int
val const_wr_event : int
val const_pri_event : int
val const_err_event : int
val const_hup_event : int
val const_nval_event : int
type event_aggregator
type event_source
val have_event_aggregation : unit -> bool
val create_event_aggregator : bool -> Netsys_posix.event_aggregator
val destroy_event_aggregator : Netsys_posix.event_aggregator -> unit
val fd_event_source :
Unix.file_descr ->
Netsys_posix.poll_req_events -> Netsys_posix.event_source
val modify_fd_event_source :
Netsys_posix.event_source -> Netsys_posix.poll_req_events -> unit
val get_fd_of_event_source : Netsys_posix.event_source -> Unix.file_descr
val act_events_of_event_source :
Netsys_posix.event_source -> Netsys_posix.poll_act_events
val add_event_source :
Netsys_posix.event_aggregator -> Netsys_posix.event_source -> unit
val del_event_source :
Netsys_posix.event_aggregator -> Netsys_posix.event_source -> unit
val interrupt_event_aggregator : Netsys_posix.event_aggregator -> unit
val push_event_updates : Netsys_posix.event_aggregator -> unit
val poll_event_sources :
Netsys_posix.event_aggregator -> float -> Netsys_posix.event_source list
val event_aggregator_fd : Netsys_posix.event_aggregator -> Unix.file_descr
class type post_fork_handler =
object method name : string method run : unit -> unit end
val register_post_fork_handler : Netsys_posix.post_fork_handler -> unit
val remove_post_fork_handler : Netsys_posix.post_fork_handler -> unit
val run_post_fork_handlers : unit -> unit
type wd_spec = Wd_keep | Wd_chdir of string | Wd_fchdir of Unix.file_descr
type pg_spec =
Pg_keep
| Pg_new_bg_group
| Pg_new_fg_group
| Pg_join_group of int
type fd_action =
Fda_close of Unix.file_descr
| Fda_close_ignore of Unix.file_descr
| Fda_close_except of bool array
| Fda_dup2 of Unix.file_descr * Unix.file_descr
type sig_action =
Sig_default of int
| Sig_ignore of int
| Sig_mask of int list
val spawn :
?chdir:Netsys_posix.wd_spec ->
?pg:Netsys_posix.pg_spec ->
?fd_actions:Netsys_posix.fd_action list ->
?sig_actions:Netsys_posix.sig_action list ->
?env:string array ->
?no_posix_spawn:bool -> string -> string array -> int
type not_event
val create_event : unit -> Netsys_posix.not_event
external set_nonblock_event : Netsys_posix.not_event -> unit
= "netsys_set_nonblock_not_event"
external get_event_fd : Netsys_posix.not_event -> Unix.file_descr
= "netsys_get_not_event_fd"
external set_event : Netsys_posix.not_event -> unit
= "netsys_set_not_event"
external wait_event : Netsys_posix.not_event -> unit
= "netsys_wait_not_event"
external consume_event : Netsys_posix.not_event -> unit
= "netsys_consume_not_event"
val destroy_event : Netsys_posix.not_event -> unit
val report_signal_as_event : Netsys_posix.not_event -> int -> unit
type watched_subprocess
val watch_subprocess :
int -> int -> bool -> Unix.file_descr * Netsys_posix.watched_subprocess
val ignore_subprocess : Netsys_posix.watched_subprocess -> unit
val forget_subprocess : Netsys_posix.watched_subprocess -> unit
val get_subprocess_status :
Netsys_posix.watched_subprocess -> Unix.process_status option
val kill_subprocess : int -> Netsys_posix.watched_subprocess -> unit
val killpg_subprocess : int -> Netsys_posix.watched_subprocess -> unit
val kill_all_subprocesses : int -> bool -> bool -> unit
val killpg_all_subprocesses : int -> bool -> unit
val install_subprocess_handler : unit -> unit
val register_subprocess_handler : unit -> unit
type level = Netlog.level
type syslog_facility =
[ `Authpriv
| `Cron
| `Daemon
| `Default
| `Ftp
| `Kern
| `Local0
| `Local1
| `Local2
| `Local3
| `Local4
| `Local5
| `Local6
| `Local7
| `Lpr
| `Mail
| `News
| `Syslog
| `User
| `Uucp ]
type syslog_option = [ `Cons | `Ndelay | `Nowait | `Odelay | `Pid ]
val openlog :
string option ->
Netsys_posix.syslog_option list -> Netsys_posix.syslog_facility -> unit
val syslog :
Netsys_posix.syslog_facility -> Netsys_posix.level -> string -> unit
val closelog : unit -> unit
external fsync : Unix.file_descr -> unit = "netsys_fsync"
external fdatasync : Unix.file_descr -> unit = "netsys_fdatasync"
external have_fadvise : unit -> bool = "netsys_have_posix_fadvise"
type advice =
POSIX_FADV_NORMAL
| POSIX_FADV_SEQUENTIAL
| POSIX_FADV_RANDOM
| POSIX_FADV_NOREUSE
| POSIX_FADV_WILLNEED
| POSIX_FADV_DONTNEED
| FADV_NORMAL
| FADV_SEQUENTIAL
| FADV_RANDOM
| FADV_NOREUSE
| FADV_WILLNEED
| FADV_DONTNEED
external fadvise :
Unix.file_descr -> int64 -> int64 -> Netsys_posix.advice -> unit
= "netsys_fadvise"
external have_fallocate : unit -> bool = "netsys_have_posix_fallocate"
external fallocate : Unix.file_descr -> int64 -> int64 -> unit
= "netsys_fallocate"
external have_posix_shm : unit -> bool = "netsys_have_posix_shm"
type shm_open_flag =
SHM_O_RDONLY
| SHM_O_RDWR
| SHM_O_CREAT
| SHM_O_EXCL
| SHM_O_TRUNC
external shm_open :
string -> Netsys_posix.shm_open_flag list -> int -> Unix.file_descr
= "netsys_shm_open"
external shm_unlink : string -> unit = "netsys_shm_unlink"
val shm_create : string -> int -> Unix.file_descr * string
val have_named_posix_semaphores : unit -> bool
val have_anon_posix_semaphores : unit -> bool
val have_posix_semaphores : unit -> bool
val sem_value_max : int
val sem_size : int
type sem_kind = [ `Anonymous | `Named ]
type 'sem_kind semaphore
type named_semaphore = [ `Named ] Netsys_posix.semaphore
type anon_semaphore = [ `Anonymous ] Netsys_posix.semaphore
type sem_open_flag = SEM_O_CREAT | SEM_O_EXCL
val sem_open :
string ->
Netsys_posix.sem_open_flag list ->
int -> int -> Netsys_posix.named_semaphore
val sem_close : Netsys_posix.named_semaphore -> unit
val sem_unlink : string -> unit
val sem_create : string -> int -> Netsys_posix.named_semaphore * string
val sem_init :
Netsys_types.memory -> int -> bool -> int -> Netsys_posix.anon_semaphore
val sem_destroy : Netsys_posix.anon_semaphore -> unit
val as_sem : Netsys_types.memory -> int -> Netsys_posix.anon_semaphore
val sem_getvalue : 'kind Netsys_posix.semaphore -> int
val sem_post : 'kind Netsys_posix.semaphore -> unit
type sem_wait_behavior = SEM_WAIT_BLOCK | SEM_WAIT_NONBLOCK
val sem_wait :
'kind Netsys_posix.semaphore -> Netsys_posix.sem_wait_behavior -> unit
type langinfo = {
nl_CODESET : string;
nl_D_T_FMT : string;
nl_D_FMT : string;
nl_T_FMT : string;
nl_T_FMT_AMPM : string;
nl_AM_STR : string;
nl_PM_STR : string;
nl_DAY_1 : string;
nl_DAY_2 : string;
nl_DAY_3 : string;
nl_DAY_4 : string;
nl_DAY_5 : string;
nl_DAY_6 : string;
nl_DAY_7 : string;
nl_ABDAY_1 : string;
nl_ABDAY_2 : string;
nl_ABDAY_3 : string;
nl_ABDAY_4 : string;
nl_ABDAY_5 : string;
nl_ABDAY_6 : string;
nl_ABDAY_7 : string;
nl_MON_1 : string;
nl_MON_2 : string;
nl_MON_3 : string;
nl_MON_4 : string;
nl_MON_5 : string;
nl_MON_6 : string;
nl_MON_7 : string;
nl_MON_8 : string;
nl_MON_9 : string;
nl_MON_10 : string;
nl_MON_11 : string;
nl_MON_12 : string;
nl_ABMON_1 : string;
nl_ABMON_2 : string;
nl_ABMON_3 : string;
nl_ABMON_4 : string;
nl_ABMON_5 : string;
nl_ABMON_6 : string;
nl_ABMON_7 : string;
nl_ABMON_8 : string;
nl_ABMON_9 : string;
nl_ABMON_10 : string;
nl_ABMON_11 : string;
nl_ABMON_12 : string;
nl_ERA : string;
nl_ERA_D_FMT : string;
nl_ERA_D_T_FMT : string;
nl_ERA_T_FMT : string;
nl_ALT_DIGITS : string;
nl_RADIXCHAR : string;
nl_THOUSEP : string;
nl_YESEXPR : string;
nl_NOEXPR : string;
nl_CRNCYSTR : string;
}
val query_langinfo : string -> Netsys_posix.langinfo
type timespec = float * int
external nanosleep :
Netsys_posix.timespec -> Netsys_posix.timespec Pervasives.ref -> unit
= "netsys_nanosleep"
type clock_id
type clock =
CLOCK_REALTIME
| CLOCK_MONOTONIC
| CLOCK_ID of Netsys_posix.clock_id
external clock_gettime : Netsys_posix.clock -> Netsys_posix.timespec
= "netsys_clock_gettime"
external clock_settime :
Netsys_posix.clock -> Netsys_posix.timespec -> unit
= "netsys_clock_settime"
external clock_getres : Netsys_posix.clock -> Netsys_posix.timespec
= "netsys_clock_getres"
external clock_getcpuclockid : int -> Netsys_posix.clock_id
= "netsys_clock_getcpuclockid"
type posix_timer
type timer_expiration =
TEXP_NONE
| TEXP_EVENT of Netsys_posix.not_event
| TEXP_EVENT_CREATE
| TEXP_SIGNAL of int
val have_posix_timer : unit -> bool
val timer_create :
Netsys_posix.clock ->
Netsys_posix.timer_expiration -> Netsys_posix.posix_timer
val timer_settime :
Netsys_posix.posix_timer ->
bool -> Netsys_posix.timespec -> Netsys_posix.timespec -> unit
val timer_gettime : Netsys_posix.posix_timer -> Netsys_posix.timespec
val timer_delete : Netsys_posix.posix_timer -> unit
val timer_event : Netsys_posix.posix_timer -> Netsys_posix.not_event
val have_ioprio : unit -> bool
type ioprio_target =
Ioprio_process of int
| Ioprio_pgrp of int
| Ioprio_user of int
type ioprio = Noprio | Real_time of int | Best_effort of int | Idle
external ioprio_get : Netsys_posix.ioprio_target -> Netsys_posix.ioprio
= "netsys_ioprio_get"
external ioprio_set :
Netsys_posix.ioprio_target -> Netsys_posix.ioprio -> unit
= "netsys_ioprio_set"
module Debug : sig val enable : bool Pervasives.ref end
end`