Cygwin: pty: Add missing CloseHandle() calls.
- PTY code which support pseudo console has a problem that causes handle leaks. Four of these are bug in pty code, and the other one seems to be a bug of Windows10. ClosePseudoConsole() fails to close one internal handle. This patch fixes the issue.
This commit is contained in:
committed by
Corinna Vinschen
parent
bb7741acf8
commit
bb30582a99
@@ -1763,4 +1763,17 @@ extern "C"
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
/* This is for pseudo console workaround. ClosePseudoConsole()
|
||||
seems to have a bug that one internal handle remains opend.
|
||||
This causes handle leak. To close this handle, it is needed
|
||||
to access internal of HPCON. HPCON_INTERNAL is defined for
|
||||
this purpose. The structure of internal of HPCON is not
|
||||
documented. Refer to: https://github.com/Biswa96/XConPty */
|
||||
typedef struct _HPCON_INTERNAL
|
||||
{
|
||||
HANDLE hWritePipe;
|
||||
HANDLE hConDrvReference;
|
||||
HANDLE hConHostProcess;
|
||||
} HPCON_INTERNAL;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user