Interrupt periodic save when launching process
To avoid interactions between the periodic save thread and external processes, stop the periodic save thread before launching an external program and restart the thread as soon as the program is terminated. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
@@ -575,6 +575,8 @@ void wins_prepare_external(void)
|
|||||||
{
|
{
|
||||||
if (notify_bar())
|
if (notify_bar())
|
||||||
notify_stop_main_thread();
|
notify_stop_main_thread();
|
||||||
|
if (conf.periodic_save > 0)
|
||||||
|
io_stop_psave_thread();
|
||||||
def_prog_mode();
|
def_prog_mode();
|
||||||
ui_mode = UI_CMDLINE;
|
ui_mode = UI_CMDLINE;
|
||||||
clear();
|
clear();
|
||||||
@@ -596,6 +598,8 @@ void wins_unprepare_external(void)
|
|||||||
wins_update(FLAG_ALL);
|
wins_update(FLAG_ALL);
|
||||||
if (notify_bar())
|
if (notify_bar())
|
||||||
notify_start_main_thread();
|
notify_start_main_thread();
|
||||||
|
if (conf.periodic_save > 0)
|
||||||
|
io_start_psave_thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user