From 57c1d9334ddf338c63ad285452f555bbb7f20a1d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 27 May 2025 17:11:02 +0530 Subject: [PATCH] ... --- kitty/launcher/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kitty/launcher/main.c b/kitty/launcher/main.c index af51d83ba..b01f04aeb 100644 --- a/kitty/launcher/main.c +++ b/kitty/launcher/main.c @@ -409,6 +409,8 @@ handle_fast_commandline(CLISpec *cli_spec, const char *instance_group_prefix) { reopen_or_fail(detached_log, "ab", stderr); #undef reopen_or_fail if (fork() != 0) { + // wait until child has done setsid() before exiting so that it doesnt get a SIGHUP, + // see: https://github.com/kovidgoyal/kitty/issues/8680 errno = 0; while(read(fds[0], NULL, 0) == -1 && errno == EINTR); exit(0); }