pub fn query_signal_disposition(signum: c_int) -> Result<SignalDisposition>
Expand description
Query the current disposition of a signal (signum
).
This inspects the kernel’s sigaction
state for the given signal
without changing it (by passing act = NULL
).
Returns:
SignalDisposition::Ignored
if the handler isSIG_IGN
SignalDisposition::Default
if the handler isSIG_DFL
SignalDisposition::Custom
if a user-installed handler is present
§Errors
Returns an io::Error
if the underlying sigaction
call fails,
for example if signum
is invalid.