Commit Graph

4 Commits (10e612d72c49c5c8762cca4fd17c864b3f373f70)

Author SHA1 Message Date
v9v 10e612d72c
Handle missing flock
If flock is not installed, fall back to the thread-unsafe version.
2019-07-05 19:33:12 +02:00
v9v 721890d22f Fix race condition in autosave
Fixes the case where multiple tmux sessions call auto-save at the same time, which occasionally results in multiple instances of save_all() running in parallel and causing issues like #3 and tmux-plugins/tmux-resurrect#294.

The sequence in main() is:
1. Check enough_time_since_last_run_passed
2. Save
3. Update last_save_timestamp.

The race here is:
* process A finishes step 1 and is busy with step 2. The timestamp is not updated yet.
* process B comes to step 1, sees the old timestamp and proceeds to step 2, too.
2019-07-04 20:21:02 +02:00
Bruno Sutic bdc47273d3
Properly quote scripts 2015-02-20 15:48:36 +01:00
Bruno Sutic 20a83738c0
Rename the plugin to 'tmux-continuum' 2015-02-20 13:38:09 +01:00