tmux-resurrect icon indicating copy to clipboard operation
tmux-resurrect copied to clipboard

Fix a race condition when restoring pane contents

Open jkp opened this issue 5 years ago • 2 comments
trafficstars

If the pane contents files are deleted too quickly then pane contents restoration fails.

Cleanup previous content JiT before a restore rather than after a restore has happened to avoid this

jkp avatar Feb 13 '20 22:02 jkp

If the pane contents files are deleted too quickly then pane contents restoration fails.

Can you please explain your understanding of how this happens?

Cleanup previous content JiT before a restore

How come there IS previous content? My understanding is we delete it after restore is completed.

bruno- avatar Feb 29 '20 00:02 bruno-

Hi - I cannot remember the details exactly now as it was a few weeks back but basically I found that if there is a lot of load on the system the contents files could be deleted before tmux got a chance to read from them. With this patch it never happens since old contents are deleted only when new ones need to be written.

Answering your second question: there can be previous content because with this patch it is deleted "lazily".

jkp avatar Mar 05 '20 11:03 jkp