mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 03:50:17 +01:00
nmcli: be less insistant on exiting when readline() gets no input
When the input ends, we indeed eventually want to shut down. Nevertheless, it might be that we terminated the input *because* we're already shutting down and want do do our cleanup. Let's not take the shortcut to nmc_exit() in case the main loop is no longer running. This doesn't affect existing uses of nmc_readline(), but will be useful in a future patch.
This commit is contained in:
parent
5f9d2927ed
commit
47eaf963e3
1 changed files with 2 additions and 1 deletions
|
|
@ -929,7 +929,8 @@ read_again:
|
|||
}
|
||||
} else if (!rl_string) {
|
||||
/* Ctrl-D, exit */
|
||||
nmc_exit();
|
||||
if (g_main_loop_is_running(loop))
|
||||
nmc_exit();
|
||||
}
|
||||
|
||||
/* Return NULL, not empty string */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue