mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 00:38:07 +02:00
tui: allow ^Z to suspend the app
This way if we end up with bugs that make it otherwise impossible to kill nmtui, you can at least ^Z and then kill it from the command line.
This commit is contained in:
parent
b4216ccb2d
commit
ce26445b6f
1 changed files with 10 additions and 0 deletions
|
|
@ -110,6 +110,14 @@ nmt_newt_basic_g_log_handler (const char *log_domain,
|
||||||
newtResume ();
|
newtResume ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
nmt_newt_suspend_callback (gpointer user_data)
|
||||||
|
{
|
||||||
|
newtSuspend ();
|
||||||
|
kill (getpid (), SIGTSTP);
|
||||||
|
newtResume ();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nmt_newt_init:
|
* nmt_newt_init:
|
||||||
*
|
*
|
||||||
|
|
@ -132,6 +140,8 @@ nmt_newt_init (void)
|
||||||
g_log_set_default_handler (nmt_newt_dialog_g_log_handler, NULL);
|
g_log_set_default_handler (nmt_newt_dialog_g_log_handler, NULL);
|
||||||
else
|
else
|
||||||
g_log_set_default_handler (nmt_newt_basic_g_log_handler, NULL);
|
g_log_set_default_handler (nmt_newt_basic_g_log_handler, NULL);
|
||||||
|
|
||||||
|
newtSetSuspendCallback (nmt_newt_suspend_callback, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue