Verified Commit d53fc6af authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Handle sigterm instead of sigkill

parent 87ecce9e
...@@ -20,7 +20,7 @@ use std::sync::atomic::Ordering; ...@@ -20,7 +20,7 @@ use std::sync::atomic::Ordering;
use uuid::Uuid; use uuid::Uuid;
#[cfg(target_os = "redox")] #[cfg(target_os = "redox")]
use syscall::{sigaction, SigAction, SIGKILL}; use syscall::{sigaction, SigAction, SIGTERM};
use redoxfs::IS_UMT; use redoxfs::IS_UMT;
#[cfg(target_os = "redox")] #[cfg(target_os = "redox")]
...@@ -33,11 +33,13 @@ extern "C" fn unmount_handler(_s: usize) { ...@@ -33,11 +33,13 @@ extern "C" fn unmount_handler(_s: usize) {
//for, so I put 2. I don't think 0,0 is a valid sa_mask. I don't know what i'm doing here. When u //for, so I put 2. I don't think 0,0 is a valid sa_mask. I don't know what i'm doing here. When u
//send it a sigkill, it shuts off the filesystem //send it a sigkill, it shuts off the filesystem
fn setsig() { fn setsig() {
sigaction(SIGKILL,Some(&SigAction{ let sig_action = SigAction {
sa_handler: unmount_handler, sa_handler: unmount_handler,
sa_mask: [0,0], sa_mask: [0,0],
sa_flags: 0, sa_flags: 0,
}),None).unwrap(); };
sigaction(SIGTERM, Some(&sig_action), None).unwrap();
} }
#[cfg(unix)] #[cfg(unix)]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment