diff options
author | Lukas Fleischer <lfleischer@calcurse.org> | 2017-09-08 17:52:23 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2017-09-08 21:08:54 +0200 |
commit | 0f3d1988bfacd86075c7306723ea11d63afa766a (patch) | |
tree | 480c68fe1912c7c217365075ab3f0bfbd884c5b3 /src | |
parent | 57dd3d6b66156936d170893765d45a169e7010af (diff) | |
download | calcurse-0f3d1988bfacd86075c7306723ea11d63afa766a.tar.gz calcurse-0f3d1988bfacd86075c7306723ea11d63afa766a.zip |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/wins.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -575,6 +575,8 @@ void wins_prepare_external(void) { if (notify_bar()) notify_stop_main_thread(); + if (conf.periodic_save > 0) + io_stop_psave_thread(); def_prog_mode(); ui_mode = UI_CMDLINE; clear(); @@ -596,6 +598,8 @@ void wins_unprepare_external(void) wins_update(FLAG_ALL); if (notify_bar()) notify_start_main_thread(); + if (conf.periodic_save > 0) + io_start_psave_thread(); } /* |