I think you should use "ClosePseudoConsole" in "flutter_pty_win.c" , in function start_wait_exit_thread , here is the code:
static DWORD WINAPI wait_exit_thread(LPVOID arg)
{
WaitExitOptions options = (WaitExitOptions )arg;
DWORD exit_code = 0;
WaitForSingleObject(options->pid, INFINITE);
GetExitCodeProcess(options->pid, &exit_code);
CloseHandle(options->pid);
CloseHandle(options->hMutex);
ClosePseudoConsole(options->hpty); // To close the PseudoConsole
Dart_PostInteger_DL(options->port, exit_code);
return 0;
I think you should use "ClosePseudoConsole" in "flutter_pty_win.c" , in function start_wait_exit_thread , here is the code: static DWORD WINAPI wait_exit_thread(LPVOID arg) { WaitExitOptions options = (WaitExitOptions )arg;
}
static void start_wait_exit_thread(HANDLE pid, Dart_Port port, HANDLE mutex, HPCON hpty) { WaitExitOptions *options = malloc(sizeof(WaitExitOptions));
}
If not close the Pseudo , when close the port , there is a conhost process can not be kill.