package core_unix
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=486d0e954603960fa081b3fd23e3cc3e50ac0892544acd35f9c2919c4bf5f67b
doc/core_unix.signal_unix/Signal_unix/index.html
Module Signal_unix
Signal handlers.
val of_system_int : int -> Core.Signal.tof_system_int and to_system_int return and take respectively a signal number corresponding to those in the system's /usr/include/bits/signum.h (or equivalent). It is not guaranteed that these numbers are portable across any given pair of systems -- although some are defined as standard by POSIX.
val to_system_int : Core.Signal.t -> intval sexp_of_pid_spec : pid_spec -> Sexplib0.Sexp.tval send : Core.Signal.t -> pid_spec -> [ `Ok | `No_such_process ]send signal pid_spec sends signal to the processes specified by pid_spec.
send_i is like send, except that it silently returns if the specified processes don't exist.
send_exn is like send, except that it raises if the specified processes don't exist.
All of send, send_i, and send_exn raise if you don't have permission to send the signal to the specified processes or if signal is unknown.
val send_i : Core.Signal.t -> pid_spec -> unitval send_exn : Core.Signal.t -> pid_spec -> unitval can_send_to : Core.Pid.t -> boolcan_send_to pid returns true if pid is running and the current process has permission to send it signals.
val sigprocmask :
sigprocmask_command ->
Core.Signal.t list ->
Core.Signal.t listsigprocmask cmd sigs changes the set of blocked signals.
- If
cmdis`Set, blocked signals are set to those in the listsigs. - If
cmdis`Block, the signals insigsare added to the set of blocked signals. - If
cmdis`Unblock, the signals insigsare removed from the set of blocked signals.
sigprocmask returns the set of previously blocked signals.
val sigpending : unit -> Core.Signal.t listsigpending () returns the set of blocked signals that are currently pending.
val sigsuspend : Core.Signal.t list -> unitsigsuspend sigs atomically sets the blocked signals to sigs and waits for * a non-ignored, non-blocked signal to be delivered. On return, the blocked * signals are reset to their initial value.