sig
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
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
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 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"
external setreuid : int -> int -> unit = "netsys_setreuid"
external setregid : int -> int -> unit = "netsys_setregid"
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
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 -> string -> string array -> int
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 have_fadvise : unit -> bool = "netsys_have_posix_fadvise"
type advice =
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 have_posix_semaphores : unit -> bool
val sem_value_max : int
val sem_size : int
type sem_kind = [ `Anonymous | `Named ]
type 'a semaphore
type named_semaphore = [ `Named ] Netsys_posix.semaphore
type anon_sempahore = [ `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_init :
Netsys_types.memory -> int -> bool -> int -> Netsys_posix.anon_sempahore
val sem_destroy : Netsys_posix.anon_sempahore -> unit
val as_sem : Netsys_types.memory -> int -> Netsys_posix.anon_sempahore
val sem_getvalue : 'a Netsys_posix.semaphore -> int
val sem_post : 'a Netsys_posix.semaphore -> unit
type sem_wait_behavior = SEM_WAIT_BLOCK | SEM_WAIT_NONBLOCK
val sem_wait :
'a Netsys_posix.semaphore -> Netsys_posix.sem_wait_behavior -> unit
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