diff options
Diffstat (limited to 'source/dw/app/inisig.rs')
-rw-r--r-- | source/dw/app/inisig.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/dw/app/inisig.rs b/source/dw/app/inisig.rs index 12e8061..5c951ab 100644 --- a/source/dw/app/inisig.rs +++ b/source/dw/app/inisig.rs @@ -1,18 +1,18 @@ // Copyright 2023 Gabriel Jensen. -use crate::dw::app::{App,GOTINT}; +use crate::dw::app::{App, GOTINT}; extern crate libc; -use libc::{c_int,sighandler_t,signal,SIGINT,SIGTERM}; +use libc::{c_int, sighandler_t, signal, SIGINT, SIGTERM}; use std::mem::transmute; use std::sync::atomic::Ordering; fn hnd(sig: c_int) { unsafe { - signal(sig,transmute::<fn(c_int),sighandler_t>(hnd)); + signal(sig, transmute::<fn(c_int), sighandler_t>(hnd)); - GOTINT.store(true,Ordering::Relaxed); + GOTINT.store(true, Ordering::Relaxed); } } @@ -21,8 +21,8 @@ impl App { eprintln!("initialising signal handlers"); unsafe { - signal(SIGINT, transmute::<fn(c_int),sighandler_t>(hnd)); - signal(SIGTERM,transmute::<fn(c_int),sighandler_t>(hnd)); + signal(SIGINT, transmute::<fn(c_int), sighandler_t>(hnd)); + signal(SIGTERM, transmute::<fn(c_int), sighandler_t>(hnd)); } } } |