Skip to content

Commit

Permalink
Test-12
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed Dec 5, 2024
1 parent 20428a3 commit 2fd32b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion WinPort/src/Backend/WinPortMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ extern "C" int WinPortMain(const char *full_exe_path, int argc, char **argv, int
}
}

exit(54);
// exit(54);

if (arg_opts.tty) {
if (!tty_raw_mode) {
Expand All @@ -548,15 +548,18 @@ extern "C" int WinPortMain(const char *full_exe_path, int argc, char **argv, int
arg_opts.far2l_tty, arg_opts.esc_expiration, -1, argc, argv, AppMain, &result)) {
fprintf(stderr, "Cannot use TTY backend\n");
}
exit(55);

} else {
int notify_pipe = TTYTryReviveSome(std_in, std_out, arg_opts.far2l_tty, tty_raw_mode, g_sigwinch_pid);
if (notify_pipe == -1) {
int new_notify_pipe[2] {-1, -1};
if (pipe(new_notify_pipe) == -1) {
exit(56);
perror("notify_pipe");
return -1;
}
exit(57);
MakeFDCloexec(new_notify_pipe[0]);
MakeFDNonCloexec(std_in);
MakeFDNonCloexec(std_out);
Expand All @@ -575,6 +578,7 @@ extern "C" int WinPortMain(const char *full_exe_path, int argc, char **argv, int
fprintf(stderr, "Cannot use TTY backend\n");
}
}
exit(58);
_exit(result);
}
close(new_notify_pipe[1]);
Expand Down

0 comments on commit 2fd32b4

Please sign in to comment.