Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Robin Randhawa
redoxfs
Commits
d53fc6af
Verified
Commit
d53fc6af
authored
Dec 08, 2018
by
Jeremy Soller
Browse files
Handle sigterm instead of sigkill
parent
87ecce9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/mount.rs
View file @
d53fc6af
...
...
@@ -20,7 +20,7 @@ use std::sync::atomic::Ordering;
use
uuid
::
Uuid
;
#[cfg(target_os
=
"redox"
)]
use
syscall
::{
sigaction
,
SigAction
,
SIG
KILL
};
use
syscall
::{
sigaction
,
SigAction
,
SIG
TERM
};
use
redoxfs
::
IS_UMT
;
#[cfg(target_os
=
"redox"
)]
...
...
@@ -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
//send it a sigkill, it shuts off the filesystem
fn
setsig
()
{
sigaction
(
SIGKILL
,
Some
(
&
SigAction
{
let
sig
_
action
=
SigAction
{
sa_handler
:
unmount_handler
,
sa_mask
:
[
0
,
0
],
sa_flags
:
0
,
}),
None
)
.unwrap
();
};
sigaction
(
SIGTERM
,
Some
(
&
sig_action
),
None
)
.unwrap
();
}
#[cfg(unix)]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment