fix(process): check for HANDLE_INVALID (#1475)

This commit is contained in:
Takase 2023-04-19 09:02:10 +08:00 committed by takase1121
parent 760271d416
commit 1952848caa
No known key found for this signature in database
GPG Key ID: 60EEFFC68EB3031B
1 changed files with 1 additions and 1 deletions

View File

@ -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