fix: fflush(NULL) before fork

This commit is contained in:
grialion
2026-01-17 17:15:04 +01:00
parent 424b3930a2
commit 9253381d72

View File

@@ -180,6 +180,7 @@ static void launch_with_xorg_server(struct session_exec* NNULLABLE exec,
int xorg_pipefd[2]; int xorg_pipefd[2];
if (pipe(xorg_pipefd) == -1) _exit(EXIT_FAILURE); if (pipe(xorg_pipefd) == -1) _exit(EXIT_FAILURE);
(void)fflush(NULL);
pid_t xorg_pid = fork(); pid_t xorg_pid = fork();
if (xorg_pid == 0) { if (xorg_pid == 0) {
start_xorg_server(pw, envlist, xorg_pipefd); start_xorg_server(pw, envlist, xorg_pipefd);
@@ -206,6 +207,7 @@ static void launch_with_xorg_server(struct session_exec* NNULLABLE exec,
_exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
} }
(void)fflush(NULL);
pid_t xorg_session_pid = fork(); pid_t xorg_session_pid = fork();
if (xorg_session_pid == 0) { if (xorg_session_pid == 0) {
int exit = session_exec_exec(exec, envlist); int exit = session_exec_exec(exec, envlist);