From 246d4fc93fe108b4ca2aaba2bcde884ad9ac20a2 Mon Sep 17 00:00:00 2001 From: Takase <20792268+takase1121@users.noreply.github.com> Date: Wed, 19 Apr 2023 09:02:10 +0800 Subject: [PATCH] fix(process): check for HANDLE_INVALID (#1475) --- src/api/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/process.c b/src/api/process.c index 2e343c6c..d7bfeb72 100644 --- a/src/api/process.c +++ b/src/api/process.c @@ -100,7 +100,7 @@ typedef enum { } filed_e; static void close_fd(process_stream_t *handle) { - if (*handle) { + if (*handle && *handle != HANDLE_INVALID) { #ifdef _WIN32 CloseHandle(*handle); #else