From 015566ed0021b719651461bc3b6c3b41d7426d83 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 22 Oct 2013 20:41:09 +0000 Subject: [PATCH] * fhandler.h (fhandler_base::cleanup): Mark as extern rather than inline. * fhandler_base.cc (fhandler_base::cleanup): Define. * fhandler_tty.cc (fhandler_pty_slave::cleanup): Call fhandler_base::cleanup. (fhandler_pty_master::cleanup): Ditto. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/fhandler.cc | 5 +++++ winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_tty.cc | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5e3dbdabc..30d0c6726 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2013-10-22 Christopher Faylor + + * fhandler.h (fhandler_base::cleanup): Mark as extern rather than + inline. + * fhandler_base.cc (fhandler_base::cleanup): Define. + * fhandler_tty.cc (fhandler_pty_slave::cleanup): Call fhandler_base::cleanup. + (fhandler_pty_master::cleanup): Ditto. + 2013-10-18 Christopher Faylor * fhandler_termios.cc (tty_min::kill_pgrp): Don't send a signal to diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 920ab7f49..cae50e53d 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1109,6 +1109,11 @@ fhandler_base::close_with_arch () return res; } +void +fhandler_base::cleanup () +{ +} + int fhandler_base::close () { diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index f7bcb153a..73b5f4735 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -315,7 +315,7 @@ class fhandler_base int close_with_arch (); virtual int close (); - virtual void cleanup () { return; } + virtual void cleanup (); int _archetype_usecount (const char *fn, int ln, int n) { if (!archetype) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 34c879503..a5ab72434 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -573,6 +573,7 @@ fhandler_pty_slave::cleanup () synced or before a non-cygwin process has exited, it should be safe to just close this normally. cgf 2006-05-20 */ report_tty_counts (this, "closed", ""); + fhandler_base::cleanup (); } int @@ -1277,6 +1278,7 @@ fhandler_pty_master::cleanup () report_tty_counts (this, "closing master", ""); if (archetype) from_master = to_master = NULL; + fhandler_base::cleanup (); } int