1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 11:46:37 +00:00

SCP: Report errno value when starting instruction execution fails

This commit is contained in:
Mark Pizzolato
2018-05-08 02:51:17 -07:00
parent 961f5e3285
commit 6ccbfc7381
2 changed files with 10 additions and 6 deletions

View File

@@ -3988,7 +3988,7 @@ runtty.c_cc[VINTR] = 0; /* OS X doesn't deliver
#else
runtty.c_cc[VINTR] = sim_int_char; /* in case changed */
#endif
if (tcsetattr (0, TCSAFLUSH, &runtty) < 0)
if (tcsetattr (fileno(stdin), TCSAFLUSH, &runtty) < 0)
return SCPE_TTIERR;
sim_os_set_thread_priority (PRIORITY_BELOW_NORMAL); /* try to lower pri */
return SCPE_OK;
@@ -3999,7 +3999,7 @@ static t_stat sim_os_ttcmd (void)
if (!isatty (fileno (stdin))) /* skip if !tty */
return SCPE_OK;
sim_os_set_thread_priority (PRIORITY_NORMAL); /* try to raise pri */
if (tcsetattr (0, TCSAFLUSH, &cmdtty) < 0)
if (tcsetattr (fileno(stdin), TCSAFLUSH, &cmdtty) < 0)
return SCPE_TTIERR;
return SCPE_OK;
}