Skip to content

Prevent infinite loop when using on-quit - #1856

Merged
joelim-work merged 1 commit into
gokcehan:masterfrom
joelim-work:quit-patch
Nov 17, 2024
Merged

Prevent infinite loop when using on-quit#1856
joelim-work merged 1 commit into
gokcehan:masterfrom
joelim-work:quit-patch

Conversation

@joelim-work

Copy link
Copy Markdown
Contributor

To reproduce, use the following config, start lf and then close the terminal window:

cmd on-quit ${{
    notify-send foo
    sleep 1
}}

Because the terminal is already closed, running on-quit as a synchronous shell command will cause app.quit to be called again, forming an infinite loop.

@joelim-work
joelim-work merged commit 68a29c9 into gokcehan:master Nov 17, 2024
@joelim-work
joelim-work deleted the quit-patch branch November 17, 2024 12:10
@joelim-work joelim-work added the fix Pull requests that fix existing behavior label Nov 17, 2024
@joelim-work joelim-work added this to the r34 milestone Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull requests that fix existing behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: on-quit is potentially executed infinite times if in synchronous block lf doesnt close/kill, when closed window in tilling windows manager

1 participant