From ef199f179abff35c61751070c1b9d7062ca1c0ba Mon Sep 17 00:00:00 2001 From: brolley Date: Mon, 22 Mar 2004 21:26:44 +0000 Subject: [PATCH] 2004-03-22 Dave Brolley * socketio.cxx (fini_handler): Flush out remaining data before terminating. --- sid/component/consoles/ChangeLog | 5 +++++ sid/component/consoles/socketio.cxx | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sid/component/consoles/ChangeLog b/sid/component/consoles/ChangeLog index 384d946c47..f59592f00a 100644 --- a/sid/component/consoles/ChangeLog +++ b/sid/component/consoles/ChangeLog @@ -1,3 +1,8 @@ +2004-03-22 Dave Brolley + + * socketio.cxx (fini_handler): Flush out remaining data before + terminating. + 2003-07-14 Dave Brolley * stdio.cxx (read): Restore flags to their original state. diff --git a/sid/component/consoles/socketio.cxx b/sid/component/consoles/socketio.cxx index c997ad99a2..1d420ec2b3 100644 --- a/sid/component/consoles/socketio.cxx +++ b/sid/component/consoles/socketio.cxx @@ -1,7 +1,7 @@ // socketio.cxx - A console that uses a socket to do its I/O. // -*- C++ -*- -// Copyright (C) 1999, 2000, 2002 Red Hat. +// Copyright (C) 1999-2002, 2004 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. @@ -298,6 +298,10 @@ socketio::fini_handler (host_int_4) { this->poll_control.cancel (); + // Flush out any remaining data + while (this->connected_p && this->out_buffer.length() != 0) + this->poll_transmit (); + if (this->connected_p) { assert (this->fd >= 0); -- 2.11.0