Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a race condition when restoring pane contents #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkp
Copy link

@jkp jkp commented Feb 13, 2020

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

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 jkp requested a review from bruno- February 13, 2020 22:03
@bruno-
Copy link
Member

bruno- commented Feb 29, 2020

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.

@jkp
Copy link
Author

jkp commented Mar 5, 2020

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants