From e8c8b3fe0c56aebb7a894fba8213b94b1148fbef Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 7 May 1995 05:53:20 +0000 Subject: [PATCH] Pay attention to the console_closedp flag, and take appropriate action when it is set. --- v7/src/microcode/os2pmcon.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/v7/src/microcode/os2pmcon.c b/v7/src/microcode/os2pmcon.c index e030c2c6f..03b61d344 100644 --- a/v7/src/microcode/os2pmcon.c +++ b/v7/src/microcode/os2pmcon.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: os2pmcon.c,v 1.6 1995/05/02 20:54:02 cph Exp $ +$Id: os2pmcon.c,v 1.7 1995/05/07 05:53:20 cph Exp $ Copyright (c) 1994-95 Massachusetts Institute of Technology @@ -345,6 +345,8 @@ console_clear_all (void) int OS2_pm_console_getch (void) { + if (console_closedp) + return (-1); if ((readahead_repeat == 0) && (readahead_insert == 0)) while (1) { @@ -382,6 +384,7 @@ OS2_pm_console_getch (void) break; } case mt_close_event: + console_closedp = 1; { wid_t wid = (SM_CLOSE_EVENT_WID (message)); OS2_destroy_message (message); @@ -389,7 +392,6 @@ OS2_pm_console_getch (void) } OS2_close_qid (console_event_qid); OS2_close_std_tqueue (console_tqueue); - console_closedp = 1; goto do_read; default: OS2_logic_error ("Unknown message type received by PM console."); @@ -462,6 +464,8 @@ OS2_pm_console_write (const char * data, size_t size) { const char * end = (data + size); const char * nonprint; + if (console_closedp) + return; grab_console_lock (); while (data < end) { -- 2.25.1