forgot to close write end of pipe in parent

This commit is contained in:
Kovid Goyal
2025-05-29 13:06:47 +05:30
parent f530aba366
commit 27fdfe6480

View File

@@ -412,6 +412,7 @@ handle_fast_commandline(CLISpec *cli_spec, const char *instance_group_prefix) {
// wait until child has done setsid() before exiting so that it doesnt get a SIGHUP,
// see: https://github.com/kovidgoyal/kitty/issues/8680
char buf[4];
errno = 0; while (close(fds[1]) != 0 && errno == EINTR);
errno = 0; while(read(fds[0], buf, sizeof(buf)) == -1 && errno == EINTR);
exit(0);
}