From 55898c0b5fbe6f5a86ae8360bd573074416bd9b4 Mon Sep 17 00:00:00 2001
From: Chris Hanson <org/chris-hanson/cph>
Date: Sun, 7 May 1995 05:54:12 +0000
Subject: [PATCH] In the console readahead thread, when getch() returns EOF,
 send an empty readahead message to inform Scheme that the console channel has
 been closed.

---
 v7/src/microcode/os2conio.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/v7/src/microcode/os2conio.c b/v7/src/microcode/os2conio.c
index 18e32ec04..abc5e6cb1 100644
--- a/v7/src/microcode/os2conio.c
+++ b/v7/src/microcode/os2conio.c
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: os2conio.c,v 1.7 1995/04/28 07:04:54 cph Exp $
+$Id: os2conio.c,v 1.8 1995/05/07 05:54:12 cph Exp $
 
 Copyright (c) 1994-95 Massachusetts Institute of Technology
 
@@ -133,7 +133,12 @@ console_thread (void * arg)
     {
       int c = (getch ());
       if (c == EOF)
-	break;
+	{
+	  msg_t * message = (OS2_make_readahead ());
+	  (SM_READAHEAD_SIZE (message)) = 0;
+	  send_readahead (message);
+	  break;
+	}
       {
 	int code = (OS2_keyboard_interrupt_handler (c));
 	if (code == '\0')
-- 
2.25.1