Raise SIGTSTP on UNIX and ncurses backend
See also: gyscos/cursive#521 Fixes #1040
This commit is contained in:
@@ -351,6 +351,11 @@ fn main() -> Result<(), String> {
|
||||
|
||||
cursive.add_fullscreen_layer(layout.with_name("main"));
|
||||
|
||||
#[cfg(all(unix, feature = "pancurses_backend"))]
|
||||
cursive.add_global_callback(cursive::event::Event::CtrlChar('z'), |_s| unsafe {
|
||||
libc::raise(libc::SIGTSTP);
|
||||
});
|
||||
|
||||
#[cfg(unix)]
|
||||
let mut signals = Signals::new([SIGTERM, SIGHUP]).expect("could not register signal handler");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user