mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-14 04:24:52 +02:00
macOS: Fix a regression in the previous release that caused kitty to fail to run after an unclean shutdown/crash
When porting the single instance code to C I forgot to port the lock file usage. Fixes #7846
This commit is contained in:
@@ -485,16 +485,7 @@ def _main() -> None:
|
||||
if cli_opts.single_instance:
|
||||
si_data = os.environ.pop('KITTY_SI_DATA', '')
|
||||
if si_data:
|
||||
import atexit
|
||||
fdnum, sep, socket_path = si_data.partition(':')
|
||||
talk_fd = int(fdnum)
|
||||
def cleanup_si() -> None:
|
||||
with suppress(OSError):
|
||||
os.close(talk_fd)
|
||||
with suppress(OSError):
|
||||
if sep and socket_path:
|
||||
os.unlink(socket_path)
|
||||
atexit.register(cleanup_si)
|
||||
talk_fd = int(si_data)
|
||||
bad_lines: list[BadLine] = []
|
||||
opts = create_opts(cli_opts, accumulate_bad_lines=bad_lines)
|
||||
setup_environment(opts, cli_opts)
|
||||
|
||||
Reference in New Issue
Block a user