From 8659281aafe16c5663f99208f1cf79c4355eda6f Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 1 Jan 2015 17:05:41 -0800 Subject: [PATCH] SCP: Changed sim_poll_kbd() to set the global stop_cpu when the WRU character has been received. Thus behaving consistently with platforms which learn about the WRU character by the delivery of a SIGINT. --- sim_console.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sim_console.c b/sim_console.c index 327dbb88..3c325d00 100644 --- a/sim_console.c +++ b/sim_console.c @@ -1769,9 +1769,12 @@ if (sim_send_poll_data (&sim_con_send, &c)) /* injected input charac return c; if (!sim_rem_master_mode) { c = sim_os_poll_kbd (); /* get character */ - if ((c == SCPE_STOP) || /* ^E or not Telnet? */ - ((sim_con_tmxr.master == 0) && /* and not serial? */ - (sim_con_ldsc.serport == 0))) + if (c == SCPE_STOP) { /* ^E */ + stop_cpu = 1; /* Force a stop (which is picked up by sim_process_event */ + return SCPE_OK; + } + if ((sim_con_tmxr.master == 0) && /* not Telnet? */ + (sim_con_ldsc.serport == 0)) /* and not serial? */ return c; /* in-window */ if (!sim_con_ldsc.conn) { /* no telnet or serial connection? */ if (!sim_con_ldsc.txbfd) /* unbuffered? */