Module
Module documentation.
moduleos.signal
Classes
Classes and inheritance.
classos.signal::Signal
@brief`Signal` type.
@details`Signal` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Signal {
/*
@brief `code` field.classos.signal::Watcher
@brief`Watcher` type.
@details`Watcher` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Watcher {
/*
@brief `handle` field.classos.signal::MaskGuard
@brief`MaskGuard` type.
@details`MaskGuard` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class MaskGuard {
/*
@brief `handle` field.Functions
Free functions and class methods.
functionos.signal::__signal_interrupt
Signature
extern func __signal_interrupt() -> Int;extern func __signal_interrupt() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_terminate`.@briefBinds the low-level runtime symbol `__signal_interrupt`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_terminate
Signature
extern func __signal_terminate() -> Int;extern func __signal_terminate() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_hangup`.@briefBinds the low-level runtime symbol `__signal_terminate`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_hangup
Signature
extern func __signal_hangup() -> Int;extern func __signal_hangup() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_quit`.@briefBinds the low-level runtime symbol `__signal_hangup`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_quit
Signature
extern func __signal_quit() -> Int;extern func __signal_quit() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_user1`.@briefBinds the low-level runtime symbol `__signal_quit`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_user1
Signature
extern func __signal_user1() -> Int;extern func __signal_user1() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_user2`.@briefBinds the low-level runtime symbol `__signal_user1`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_user2
Signature
extern func __signal_user2() -> Int;extern func __signal_user2() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_alarm`.@briefBinds the low-level runtime symbol `__signal_user2`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_alarm
Signature
extern func __signal_alarm() -> Int;extern func __signal_alarm() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_child`.@briefBinds the low-level runtime symbol `__signal_alarm`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_child
Signature
extern func __signal_child() -> Int;extern func __signal_child() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_broken_pipe`.@briefBinds the low-level runtime symbol `__signal_child`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_broken_pipe
Signature
extern func __signal_broken_pipe() -> Int;extern func __signal_broken_pipe() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_window_change`.@briefBinds the low-level runtime symbol `__signal_broken_pipe`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_window_change
Signature
extern func __signal_window_change() -> Int;extern func __signal_window_change() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_continue`.@briefBinds the low-level runtime symbol `__signal_window_change`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_continue
Signature
extern func __signal_continue() -> Int;extern func __signal_continue() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_stop_terminal`.@briefBinds the low-level runtime symbol `__signal_continue`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_stop_terminal
Signature
extern func __signal_stop_terminal() -> Int;extern func __signal_stop_terminal() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_terminal_input`.@briefBinds the low-level runtime symbol `__signal_stop_terminal`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_terminal_input
Signature
extern func __signal_terminal_input() -> Int;extern func __signal_terminal_input() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_terminal_output`.@briefBinds the low-level runtime symbol `__signal_terminal_input`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_terminal_output
Signature
extern func __signal_terminal_output() -> Int;extern func __signal_terminal_output() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_trap`.@briefBinds the low-level runtime symbol `__signal_terminal_output`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_trap
Signature
extern func __signal_trap() -> Int;extern func __signal_trap() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_abort`.@briefBinds the low-level runtime symbol `__signal_trap`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_abort
Signature
extern func __signal_abort() -> Int;extern func __signal_abort() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_floating_point_exception`.@briefBinds the low-level runtime symbol `__signal_abort`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_floating_point_exception
Signature
extern func __signal_floating_point_exception() -> Int;extern func __signal_floating_point_exception() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_illegal_instruction`.@briefBinds the low-level runtime symbol `__signal_floating_point_exception`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_illegal_instruction
Signature
extern func __signal_illegal_instruction() -> Int;extern func __signal_illegal_instruction() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_segmentation_fault`.@briefBinds the low-level runtime symbol `__signal_illegal_instruction`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_segmentation_fault
Signature
extern func __signal_segmentation_fault() -> Int;extern func __signal_segmentation_fault() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_bus_error`.@briefBinds the low-level runtime symbol `__signal_segmentation_fault`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_bus_error
Signature
extern func __signal_bus_error() -> Int;extern func __signal_bus_error() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_real_time_min`.@briefBinds the low-level runtime symbol `__signal_bus_error`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_real_time_min
Signature
extern func __signal_real_time_min() -> Int;extern func __signal_real_time_min() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_real_time_max`.@briefBinds the low-level runtime symbol `__signal_real_time_min`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_real_time_max
Signature
extern func __signal_real_time_max() -> Int;extern func __signal_real_time_max() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_real_time`.@briefBinds the low-level runtime symbol `__signal_real_time_max`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_real_time
Signature
extern func __signal_real_time(offset: Int) -> Int;extern func __signal_real_time(offset: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_gc_reserved`.@briefBinds the low-level runtime symbol `__signal_real_time`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- offsetByte offset measured from the start position.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_gc_reserved
Signature
extern func __signal_gc_reserved() -> Int;extern func __signal_gc_reserved() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_name`.@briefBinds the low-level runtime symbol `__signal_gc_reserved`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_name
Signature
extern func __signal_name(sig: Int) -> String;extern func __signal_name(sig: Int) -> String;
/*
@brief Binds the low-level runtime symbol `__signal_watch_new`.@briefBinds the low-level runtime symbol `__signal_name`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- sigSignal number or signal descriptor processed by the operation.
@returnReturns the operation result as `String`.
functionos.signal::__signal_watch_new
Signature
extern func __signal_watch_new() -> Int;extern func __signal_watch_new() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_watch_add`.@briefBinds the low-level runtime symbol `__signal_watch_new`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_watch_add
Signature
extern func __signal_watch_add(handle: Int, sig: Int) -> Int;extern func __signal_watch_add(handle: Int, sig: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_watch_next`.@briefBinds the low-level runtime symbol `__signal_watch_add`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- handleUnderlying runtime handle.
- sigSignal number or signal descriptor processed by the operation.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_watch_next
Signature
extern func __signal_watch_next(handle: Int) -> Int;extern func __signal_watch_next(handle: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_watch_try_next`.@briefBinds the low-level runtime symbol `__signal_watch_next`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- handleUnderlying runtime handle.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_watch_try_next
Signature
extern func __signal_watch_try_next(handle: Int) -> Int;extern func __signal_watch_try_next(handle: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_watch_stop`.@briefBinds the low-level runtime symbol `__signal_watch_try_next`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- handleUnderlying runtime handle.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_watch_stop
Signature
extern func __signal_watch_stop(handle: Int) -> Int;extern func __signal_watch_stop(handle: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_ignore`.@briefBinds the low-level runtime symbol `__signal_watch_stop`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- handleUnderlying runtime handle.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_ignore
Signature
extern func __signal_ignore(sig: Int) -> Int;extern func __signal_ignore(sig: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_reset`.@briefBinds the low-level runtime symbol `__signal_ignore`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- sigSignal number or signal descriptor processed by the operation.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_reset
Signature
extern func __signal_reset(sig: Int) -> Int;extern func __signal_reset(sig: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_kill`.@briefBinds the low-level runtime symbol `__signal_reset`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- sigSignal number or signal descriptor processed by the operation.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_kill
Signature
extern func __signal_kill(pid: Int, sig: Int) -> Int;extern func __signal_kill(pid: Int, sig: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_mask_apply`.@briefBinds the low-level runtime symbol `__signal_kill`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- pidOperating-system process identifier targeted by the operation.
- sigSignal number or signal descriptor processed by the operation.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_mask_apply
Signature
extern func __signal_mask_apply(how: Int, sig: Int) -> Int;extern func __signal_mask_apply(how: Int, sig: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_mask_snapshot`.@briefBinds the low-level runtime symbol `__signal_mask_apply`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- howMode selector that specifies how the operation should be applied.
- sigSignal number or signal descriptor processed by the operation.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_mask_snapshot
Signature
extern func __signal_mask_snapshot() -> Int;extern func __signal_mask_snapshot() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_mask_apply_snapshot`.@briefBinds the low-level runtime symbol `__signal_mask_snapshot`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_mask_apply_snapshot
Signature
extern func __signal_mask_apply_snapshot(handle: Int) -> Int;extern func __signal_mask_apply_snapshot(handle: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_mask_free_snapshot`.@briefBinds the low-level runtime symbol `__signal_mask_apply_snapshot`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- handleUnderlying runtime handle.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_mask_free_snapshot
Signature
extern func __signal_mask_free_snapshot(handle: Int) -> Int;extern func __signal_mask_free_snapshot(handle: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_mask_clear`.@briefBinds the low-level runtime symbol `__signal_mask_free_snapshot`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- handleUnderlying runtime handle.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_mask_clear
Signature
extern func __signal_mask_clear() -> Int;extern func __signal_mask_clear() -> Int;
/*
@brief Binds the low-level runtime symbol `__signal_mask_is_blocked`.@briefBinds the low-level runtime symbol `__signal_mask_clear`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@returnReturns the operation result as `Int`.
functionos.signal::__signal_mask_is_blocked
Signature
extern func __signal_mask_is_blocked(sig: Int) -> Int;extern func __signal_mask_is_blocked(sig: Int) -> Int;
/*@briefBinds the low-level runtime symbol `__signal_mask_is_blocked`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
- sigSignal number or signal descriptor processed by the operation.
@returnReturns the operation result as `Int`.
functionos.signal::Signal.init
Signature
func init(self: os.signal.Signal, code: Int = 0) -> Void func init(self: os.signal.Signal, code: Int = 0) -> Void {
self.code = code;
}@briefInitializes a `Signal` instance.
@detailsEstablishes the initial field state for `Signal` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- codeNumeric status, error, signal, opcode, or platform code handled by this API.
@returnVoid
functionos.signal::Signal.valid
Signature
func valid(self: os.signal.Signal) -> Bool func valid(self: os.signal.Signal) -> Bool {
return self.code > 0;
}@briefProvides the system library operation `Signal.valid`.
@detailsExecutes the `valid` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns a boolean result; true means the condition holds or the operation succeeded.
functionos.signal::Signal.name
Signature
func name(self: os.signal.Signal) -> String func name(self: os.signal.Signal) -> String {
return __signal_name(self.code);
}@briefProvides the system library operation `Signal.name`.
@detailsExecutes the `name` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `String`.
functionos.signal::Signal.deinit
Signature
func deinit(self: os.signal.Signal) -> Void func deinit(self: os.signal.Signal) -> Void {
}
}@briefReleases fallback resources at the end of the `Signal` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionos.signal::Watcher.init
Signature
func init(self: os.signal.Watcher, handle: Int = 0) -> Void func init(self: os.signal.Watcher, handle: Int = 0) -> Void {
self.handle = handle;
self.closed = handle == 0;@briefInitializes a `Watcher` instance.
@detailsEstablishes the initial field state for `Watcher` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- handleUnderlying runtime handle.
@returnVoid
functionos.signal::Watcher.next
Signature
func next(self: os.signal.Watcher) -> os.signal.Signal, ErrCode func next(self: os.signal.Watcher) -> os.signal.Signal, ErrCode {
if self.closed || self.handle == 0 {
return new os.signal.Signal(), std.ERR_INVALID;@briefProvides the system library operation `Watcher.next`.
@detailsExecutes the `next` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `os.signal.Signal, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::Watcher.try_next
Signature
func try_next(self: os.signal.Watcher) -> os.signal.Signal, ErrCode func try_next(self: os.signal.Watcher) -> os.signal.Signal, ErrCode {
if self.closed || self.handle == 0 {
return new os.signal.Signal(), std.ERR_INVALID;@briefProvides the system library operation `Watcher.try_next`.
@detailsExecutes the `try_next` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `os.signal.Signal, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::Watcher.stop
Signature
func stop(self: os.signal.Watcher) -> ErrCode func stop(self: os.signal.Watcher) -> ErrCode {
if self.closed {
return std.OK;@briefProvides the system library operation `Watcher.stop`.
@detailsExecutes the `stop` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::Watcher.dispose
Signature
func dispose(self: os.signal.Watcher) -> Void func dispose(self: os.signal.Watcher) -> Void {
_ = self.stop();
}@briefExplicitly releases resources owned by `Watcher`.
@detailsThis method deterministically cleans up file descriptors, network connections, native handles, buffers, or other external resources. Implementations should be idempotent where possible, and repeated calls must not corrupt object state.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionos.signal::Watcher.deinit
Signature
func deinit(self: os.signal.Watcher) -> Void func deinit(self: os.signal.Watcher) -> Void {
_ = self.stop();
}@briefReleases fallback resources at the end of the `Watcher` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionos.signal::MaskGuard.init
Signature
func init(self: os.signal.MaskGuard, handle: Int = 0) -> Void func init(self: os.signal.MaskGuard, handle: Int = 0) -> Void {
self.handle = handle;
self.active = handle != 0;@briefInitializes a `MaskGuard` instance.
@detailsEstablishes the initial field state for `MaskGuard` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- handleUnderlying runtime handle.
@returnVoid
functionos.signal::MaskGuard.restore
Signature
func restore(self: os.signal.MaskGuard) -> ErrCode func restore(self: os.signal.MaskGuard) -> ErrCode {
if !self.active {
return std.OK;@briefProvides the system library operation `MaskGuard.restore`.
@detailsExecutes the `restore` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::MaskGuard.dispose
Signature
func dispose(self: os.signal.MaskGuard) -> Void func dispose(self: os.signal.MaskGuard) -> Void {
_ = self.restore();
}@briefExplicitly releases resources owned by `MaskGuard`.
@detailsThis method deterministically cleans up file descriptors, network connections, native handles, buffers, or other external resources. Implementations should be idempotent where possible, and repeated calls must not corrupt object state.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionos.signal::MaskGuard.deinit
Signature
func deinit(self: os.signal.MaskGuard) -> Void func deinit(self: os.signal.MaskGuard) -> Void {
_ = self.restore();
}@briefReleases fallback resources at the end of the `MaskGuard` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionos.signal::from_code
Signature
func from_code(code: Int) -> os.signal.Signalfunc from_code(code: Int) -> os.signal.Signal {
return new os.signal.Signal(code);
}@briefConstructs the target representation from input with `from_code`.
@detailsExecutes the `from_code` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- codeNumeric status, error, signal, opcode, or platform code handled by this API.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::interrupt
Signature
func interrupt() -> os.signal.Signalfunc interrupt() -> os.signal.Signal {
return new os.signal.Signal(__signal_interrupt());
}@briefProvides the system library operation `interrupt`.
@detailsExecutes the `interrupt` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::terminate
Signature
func terminate() -> os.signal.Signalfunc terminate() -> os.signal.Signal {
return new os.signal.Signal(__signal_terminate());
}@briefProvides the system library operation `terminate`.
@detailsExecutes the `terminate` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::hangup
Signature
func hangup() -> os.signal.Signalfunc hangup() -> os.signal.Signal {
return new os.signal.Signal(__signal_hangup());
}@briefProvides the system library operation `hangup`.
@detailsExecutes the `hangup` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::quit
Signature
func quit() -> os.signal.Signalfunc quit() -> os.signal.Signal {
return new os.signal.Signal(__signal_quit());
}@briefProvides the system library operation `quit`.
@detailsExecutes the `quit` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::user1
Signature
func user1() -> os.signal.Signalfunc user1() -> os.signal.Signal {
return new os.signal.Signal(__signal_user1());
}@briefProvides the system library operation `user1`.
@detailsExecutes the `user1` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::user2
Signature
func user2() -> os.signal.Signalfunc user2() -> os.signal.Signal {
return new os.signal.Signal(__signal_user2());
}@briefProvides the system library operation `user2`.
@detailsExecutes the `user2` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::alarm
Signature
func alarm() -> os.signal.Signalfunc alarm() -> os.signal.Signal {
return new os.signal.Signal(__signal_alarm());
}@briefProvides the system library operation `alarm`.
@detailsExecutes the `alarm` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::child
Signature
func child() -> os.signal.Signalfunc child() -> os.signal.Signal {
return new os.signal.Signal(__signal_child());
}@briefProvides the system library operation `child`.
@detailsExecutes the `child` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::broken_pipe
Signature
func broken_pipe() -> os.signal.Signalfunc broken_pipe() -> os.signal.Signal {
return new os.signal.Signal(__signal_broken_pipe());
}@briefProvides the system library operation `broken_pipe`.
@detailsExecutes the `broken_pipe` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::window_change
Signature
func window_change() -> os.signal.Signalfunc window_change() -> os.signal.Signal {
return new os.signal.Signal(__signal_window_change());
}@briefProvides the system library operation `window_change`.
@detailsExecutes the `window_change` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::continued
Signature
func continued() -> os.signal.Signalfunc continued() -> os.signal.Signal {
return new os.signal.Signal(__signal_continue());
}@briefProvides the system library operation `continued`.
@detailsExecutes the `continued` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::stop_terminal
Signature
func stop_terminal() -> os.signal.Signalfunc stop_terminal() -> os.signal.Signal {
return new os.signal.Signal(__signal_stop_terminal());
}@briefProvides the system library operation `stop_terminal`.
@detailsExecutes the `stop_terminal` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::terminal_input
Signature
func terminal_input() -> os.signal.Signalfunc terminal_input() -> os.signal.Signal {
return new os.signal.Signal(__signal_terminal_input());
}@briefProvides the system library operation `terminal_input`.
@detailsExecutes the `terminal_input` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::terminal_output
Signature
func terminal_output() -> os.signal.Signalfunc terminal_output() -> os.signal.Signal {
return new os.signal.Signal(__signal_terminal_output());
}@briefProvides the system library operation `terminal_output`.
@detailsExecutes the `terminal_output` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::trap
Signature
func trap() -> os.signal.Signalfunc trap() -> os.signal.Signal {
return new os.signal.Signal(__signal_trap());
}@briefProvides the system library operation `trap`.
@detailsExecutes the `trap` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::abort
Signature
func abort() -> os.signal.Signalfunc abort() -> os.signal.Signal {
return new os.signal.Signal(__signal_abort());
}@briefProvides the system library operation `abort`.
@detailsExecutes the `abort` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::floating_point_exception
Signature
func floating_point_exception() -> os.signal.Signalfunc floating_point_exception() -> os.signal.Signal {
return new os.signal.Signal(__signal_floating_point_exception());
}@briefProvides the system library operation `floating_point_exception`.
@detailsExecutes the `floating_point_exception` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::illegal_instruction
Signature
func illegal_instruction() -> os.signal.Signalfunc illegal_instruction() -> os.signal.Signal {
return new os.signal.Signal(__signal_illegal_instruction());
}@briefProvides the system library operation `illegal_instruction`.
@detailsExecutes the `illegal_instruction` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::segmentation_fault
Signature
func segmentation_fault() -> os.signal.Signalfunc segmentation_fault() -> os.signal.Signal {
return new os.signal.Signal(__signal_segmentation_fault());
}@briefProvides the system library operation `segmentation_fault`.
@detailsExecutes the `segmentation_fault` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::bus_error
Signature
func bus_error() -> os.signal.Signalfunc bus_error() -> os.signal.Signal {
return new os.signal.Signal(__signal_bus_error());
}@briefProvides the system library operation `bus_error`.
@detailsExecutes the `bus_error` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::real_time_min
Signature
func real_time_min() -> os.signal.Signalfunc real_time_min() -> os.signal.Signal {
return new os.signal.Signal(__signal_real_time_min());
}@briefProvides the system library operation `real_time_min`.
@detailsExecutes the `real_time_min` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::real_time_max
Signature
func real_time_max() -> os.signal.Signalfunc real_time_max() -> os.signal.Signal {
return new os.signal.Signal(__signal_real_time_max());
}@briefProvides the system library operation `real_time_max`.
@detailsExecutes the `real_time_max` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::real_time
Signature
func real_time(offset: Int) -> os.signal.Signalfunc real_time(offset: Int) -> os.signal.Signal {
return new os.signal.Signal(__signal_real_time(offset));
}@briefProvides the system library operation `real_time`.
@detailsExecutes the `real_time` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- offsetByte offset measured from the start position.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::gc_reserved
Signature
func gc_reserved() -> os.signal.Signalfunc gc_reserved() -> os.signal.Signal {
return new os.signal.Signal(__signal_gc_reserved());
}@briefConfigures or queries the garbage-collection runtime with `gc_reserved`.
@detailsExecutes the `gc_reserved` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `os.signal.Signal`.
functionos.signal::notify
Signature
func notify(signals: ...os.signal.Signal) -> os.signal.Watcher, ErrCodefunc notify(signals: ...os.signal.Signal) -> os.signal.Watcher, ErrCode {
if signals.len() <= 0 {
return new os.signal.Watcher(), std.ERR_INVALID;@briefProvides the system library operation `notify`.
@detailsExecutes the `notify` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- signalsSignal mask or signal collection used to configure signal handling.
@returnReturns `os.signal.Watcher, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::ignore
Signature
func ignore(signals: ...os.signal.Signal) -> ErrCodefunc ignore(signals: ...os.signal.Signal) -> ErrCode {
if signals.len() <= 0 {
return std.ERR_INVALID;@briefProvides the system library operation `ignore`.
@detailsExecutes the `ignore` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- signalsSignal mask or signal collection used to configure signal handling.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::reset
Signature
func reset(signals: ...os.signal.Signal) -> ErrCodefunc reset(signals: ...os.signal.Signal) -> ErrCode {
if signals.len() <= 0 {
return std.ERR_INVALID;@briefProvides the system library operation `reset`.
@detailsExecutes the `reset` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- signalsSignal mask or signal collection used to configure signal handling.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::kill
Signature
func kill(pid: Int, sig: os.signal.Signal) -> ErrCodefunc kill(pid: Int, sig: os.signal.Signal) -> ErrCode {
if pid <= 0 || !sig.valid() {
return std.ERR_INVALID;@briefProvides the system library operation `kill`.
@detailsExecutes the `kill` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- pidOperating-system process identifier targeted by the operation.
- sigSignal number or signal descriptor processed by the operation.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::block
Signature
func block(signals: ...os.signal.Signal) -> ErrCodefunc block(signals: ...os.signal.Signal) -> ErrCode {
if signals.len() <= 0 {
return std.ERR_INVALID;@briefProvides the system library operation `block`.
@detailsExecutes the `block` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- signalsSignal mask or signal collection used to configure signal handling.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::unblock
Signature
func unblock(signals: ...os.signal.Signal) -> ErrCodefunc unblock(signals: ...os.signal.Signal) -> ErrCode {
if signals.len() <= 0 {
return std.ERR_INVALID;@briefProvides the system library operation `unblock`.
@detailsExecutes the `unblock` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- signalsSignal mask or signal collection used to configure signal handling.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::set_mask
Signature
func set_mask(signals: ...os.signal.Signal) -> ErrCodefunc set_mask(signals: ...os.signal.Signal) -> ErrCode {
let clear_err: ErrCode = clear_mask();
if clear_err != std.OK {@briefSets state or configuration with `set_mask`.
@detailsExecutes the `set_mask` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- signalsSignal mask or signal collection used to configure signal handling.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::clear_mask
Signature
func clear_mask() -> ErrCodefunc clear_mask() -> ErrCode {
return err_from_rc(__signal_mask_clear());
}@briefProvides the system library operation `clear_mask`.
@detailsExecutes the `clear_mask` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::is_blocked
Signature
func is_blocked(sig: os.signal.Signal) -> Bool, ErrCodefunc is_blocked(sig: os.signal.Signal) -> Bool, ErrCode {
if !sig.valid() {
return false, std.ERR_INVALID;@briefTests whether the state satisfies the condition represented by `is_blocked`.
@detailsExecutes the `is_blocked` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sigSignal number or signal descriptor processed by the operation.
@returnReturns `Bool, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::scoped_block
Signature
func scoped_block(signals: ...os.signal.Signal) -> os.signal.MaskGuard, ErrCodefunc scoped_block(signals: ...os.signal.Signal) -> os.signal.MaskGuard, ErrCode {
return scoped_mask_apply(true, mask_block_op(), signals...);
}@briefProvides the system library operation `scoped_block`.
@detailsExecutes the `scoped_block` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- signalsSignal mask or signal collection used to configure signal handling.
@returnReturns `os.signal.MaskGuard, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::scoped_unblock
Signature
func scoped_unblock(signals: ...os.signal.Signal) -> os.signal.MaskGuard, ErrCodefunc scoped_unblock(signals: ...os.signal.Signal) -> os.signal.MaskGuard, ErrCode {
return scoped_mask_apply(true, mask_unblock_op(), signals...);
}@briefProvides the system library operation `scoped_unblock`.
@detailsExecutes the `scoped_unblock` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- signalsSignal mask or signal collection used to configure signal handling.
@returnReturns `os.signal.MaskGuard, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionos.signal::scoped_set
Signature
func scoped_set(signals: ...os.signal.Signal) -> os.signal.MaskGuard, ErrCodefunc scoped_set(signals: ...os.signal.Signal) -> os.signal.MaskGuard, ErrCode {
return scoped_mask_apply(false, mask_set_op(), signals...);
}@briefProvides the system library operation `scoped_set`.
@detailsExecutes the `scoped_set` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- signalsSignal mask or signal collection used to configure signal handling.
@returnReturns `os.signal.MaskGuard, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
Variables
Class fields (var).
varos.signal::Signal.code
Type
Int@brief`code` field.
@detailsHolds the `code` value for each `Signal` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var code: Int;
/*varos.signal::Watcher.handle
Type
Int@brief`handle` field.
@detailsStores the underlying runtime handle. The field type is `Int`, and it is maintained by the constructors and methods of `Watcher`.
var handle: Int;
/*
@brief `closed` field.varos.signal::Watcher.closed
Type
Bool@brief`closed` field.
@detailsIndicates whether the resource has already been closed. The field type is `Bool`, and it is maintained by the constructors and methods of `Watcher`.
var closed: Bool;
/*varos.signal::MaskGuard.handle
Type
Int@brief`handle` field.
@detailsStores the underlying runtime handle. The field type is `Int`, and it is maintained by the constructors and methods of `MaskGuard`.
var handle: Int;
/*
@brief `closed` field.varos.signal::MaskGuard.active
Type
Bool@brief`active` field.
@detailsHolds the `active` value for each `MaskGuard` instance. The field type is `Bool`, and constructors and methods keep it synchronized with the object's runtime state.
var active: Bool;
/*