-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#152 Handle Ctrl+C for _run and user commands #162
Conversation
Also we should correctly handle Ctrl+Z, but there some troubles with it. Vagga wrapper can't send SIGSTOP to self. So wrapper should ask parent process that is outside of namespace to stop wrapper. |
} | ||
|
||
pub fn ignore_tty_signals() -> Result<(), String> { | ||
let tty_signals = vec![SIGTTIN, SIGTTOU]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not "rusty" to allocate a vector just to iterate over the items. Should just call sigaction()
twice. (And yes sigaction
is a safe wrapper around the same stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't use sigaction from nix package together with SIG_IGN: nix-rust/nix#241
c87bc92
to
dd3f98f
Compare
dd3f98f
to
95e4a08
Compare
Should use |
} | ||
SIGTERM => { | ||
// SIGTERM is usually sent to a specific process so we | ||
// forward it to children | ||
debug!("Received SIGTERM signal, propagating"); | ||
child.signal(SIGTERM).ok(); | ||
try!(child.signal(SIGTERM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you think it's a fatal error? The error was ignored because we can't ensure that process is still alive.
Merged as part of #168 |
No description provided.