unix/main: Restore tty settings on nlr_jump_fail().
Since nlr_jump_fail() exits the process, it can leave the terminal in raw mode which means characters are not echoed. Fix this by restoring the original terminal mode. Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
parent
9714a0ead5
commit
093c4b6b26
@ -737,6 +737,9 @@ MP_NOINLINE int main_(int argc, char **argv) {
|
||||
}
|
||||
|
||||
void nlr_jump_fail(void *val) {
|
||||
#if MICROPY_USE_READLINE == 1
|
||||
mp_hal_stdio_mode_orig();
|
||||
#endif
|
||||
fprintf(stderr, "FATAL: uncaught NLR %p\n", val);
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user