From 520ce1733c337a3e9547ed75ceb0acc47e8ab165 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Thu, 18 Aug 2022 11:33:30 +0800 Subject: [PATCH] pty: remove close call on windows --- src/pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pty.c b/src/pty.c index 2fda996..7bf62f4 100644 --- a/src/pty.c +++ b/src/pty.c @@ -104,9 +104,9 @@ void process_free(pty_process *process) { if (process->pty != NULL) pClosePseudoConsole(process->pty); if (process->handle != NULL) CloseHandle(process->handle); #else + close(process->pty); uv_thread_join(&process->tid); #endif - close(process->pty); if (process->in != NULL) uv_close((uv_handle_t *) process->in, close_cb); if (process->out != NULL) uv_close((uv_handle_t *) process->out, close_cb); if (process->argv != NULL) free(process->argv); -- 2.43.4