From c408d0a8fa4bc492002e7733d42fe87b338d8800 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 6 Mar 2019 19:08:19 -0800 Subject: [PATCH] SCP: Avoid flushing active asynch I/O devices --- scp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scp.c b/scp.c index 8f011570..8783d33e 100644 --- a/scp.c +++ b/scp.c @@ -7713,8 +7713,11 @@ for (i = 1; (dptr = sim_devices[i]) != NULL; i++) { /* flush attached files for (j = 0; j < dptr->numunits; j++) { /* if not buffered in mem */ uptr = dptr->units + j; if (uptr->flags & UNIT_ATT) { /* attached, */ - if (uptr->io_flush) /* unit specific flush routine */ - uptr->io_flush (uptr); /* call it */ + if (uptr->io_flush) { /* unit specific flush routine? */ + if (!sim_asynch_enabled || /* and asynch I/O not possible? */ + !sim_is_running) + uptr->io_flush (uptr); /* call it */ + } else { if (!(uptr->flags & UNIT_BUF) && /* not buffered, */ (uptr->fileref) && /* real file, */