MCPcopy Index your code
hub / github.com/RustPython/RustPython / unregister

Function unregister

crates/stdlib/src/faulthandler.rs:1171–1183  ·  view source on GitHub ↗
(signum: i32, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1169 #[cfg(unix)]
1170 #[pyfunction]
1171 fn unregister(signum: i32, vm: &VirtualMachine) -> PyResult<bool> {
1172 check_signum(signum, vm)?;
1173
1174 if let Some(old) = user_signals::clear_user_signal(signum as usize) {
1175 // Restore previous handler
1176 unsafe {
1177 libc::sigaction(signum, &old.previous, core::ptr::null_mut());
1178 }
1179 Ok(true)
1180 } else {
1181 Ok(false)
1182 }
1183 }
1184
1185 // Test functions for faulthandler testing
1186

Callers

nothing calls this directly

Calls 2

check_signumFunction · 0.85
clear_user_signalFunction · 0.85

Tested by

no test coverage detected