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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user