[PATCH] Cygwin: pty: Remove destructor for fhandler_pty_master class.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Cygwin: pty: Remove destructor for fhandler_pty_master class.

Takashi Yano
- The destructor for fhandler_pty_master class does not seem to be
  necessary anymore. Therefore, it has been removed.
---
 winsup/cygwin/fhandler.h      | 1 -
 winsup/cygwin/fhandler_tty.cc | 9 ---------
 2 files changed, 10 deletions(-)

diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 3954c37d1..4a71c1628 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -2218,7 +2218,6 @@ public:
   HANDLE get_echo_handle () const { return echo_r; }
   /* Constructor */
   fhandler_pty_master (int);
-  ~fhandler_pty_master ();
 
   DWORD pty_master_thread ();
   DWORD pty_master_fwd_thread ();
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 23156f977..d3d0d7430 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -2126,15 +2126,6 @@ fhandler_pty_master::fhandler_pty_master (int unit)
   set_name ("/dev/ptmx");
 }
 
-fhandler_pty_master::~fhandler_pty_master ()
-{
-  /* Without this wait, helper process for pseudo console
-     sometimes remains running after the pty session is
-     closed. The reason is not clear. */
-  if (to_master && from_master)
-    Sleep (20);
-}
-
 int
 fhandler_pty_master::open (int flags, mode_t)
 {
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Cygwin: pty: Remove destructor for fhandler_pty_master class.

Corinna Vinschen-2
On Jan  1 15:49, Takashi Yano wrote:

> - The destructor for fhandler_pty_master class does not seem to be
>   necessary anymore. Therefore, it has been removed.
> ---
>  winsup/cygwin/fhandler.h      | 1 -
>  winsup/cygwin/fhandler_tty.cc | 9 ---------
>  2 files changed, 10 deletions(-)
>
> diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
> index 3954c37d1..4a71c1628 100644
> --- a/winsup/cygwin/fhandler.h
> +++ b/winsup/cygwin/fhandler.h
> @@ -2218,7 +2218,6 @@ public:
>    HANDLE get_echo_handle () const { return echo_r; }
>    /* Constructor */
>    fhandler_pty_master (int);
> -  ~fhandler_pty_master ();
>  
>    DWORD pty_master_thread ();
>    DWORD pty_master_fwd_thread ();
> diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
> index 23156f977..d3d0d7430 100644
> --- a/winsup/cygwin/fhandler_tty.cc
> +++ b/winsup/cygwin/fhandler_tty.cc
> @@ -2126,15 +2126,6 @@ fhandler_pty_master::fhandler_pty_master (int unit)
>    set_name ("/dev/ptmx");
>  }
>  
> -fhandler_pty_master::~fhandler_pty_master ()
> -{
> -  /* Without this wait, helper process for pseudo console
> -     sometimes remains running after the pty session is
> -     closed. The reason is not clear. */
> -  if (to_master && from_master)
> -    Sleep (20);
> -}
> -
>  int
>  fhandler_pty_master::open (int flags, mode_t)
>  {
> --
> 2.21.0
Pushed.


Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer

signature.asc (849 bytes) Download Attachment