Hi Takashi, On Jan 1 15:48, Takashi Yano wrote: > --- > winsup/cygwin/fhandler_tty.cc | 22 ++++++++++++++++++++-- > 1 file changed, 20 insertions(+), 2 deletions(-) > > diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc > index 65b12fd6c..23156f977 100644 > --- a/winsup/cygwin/fhandler_tty.cc > +++ b/winsup/cygwin/fhandler_tty.cc > @@ -2242,11 +2242,27 @@ fhandler_pty_master::close () > /* Terminate helper process */ > SetEvent (get_ttyp ()->h_helper_goodbye); > WaitForSingleObject (get_ttyp ()->h_helper_process, INFINITE); > + CloseHandle (get_ttyp ()->h_helper_goodbye); > + CloseHandle (get_ttyp ()->h_helper_process); > /* FIXME: Pseudo console can be accessed via its handle > only in the process which created it. What else can we do? */ > if (master_pid_tmp == myself->pid) > - /* Release pseudo console */ > - ClosePseudoConsole (get_pseudo_console ()); > + { > + /* ClosePseudoConsole() seems to have a bug that one > + internal handle remains opened. This causes handle leak. > + This is a workaround for this problem. */ > + typedef struct > + { > + HANDLE hWritePipe; > + HANDLE hConDrvReference; > + HANDLE hConHostProcess; > + } HPCON_INTERNAL;
Can you please move this struct to some header? Even if it's not a really close match, maybe ntdll.h works best, combined with a short comment what this is about... Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer
signature.asc
Description: PGP signature