summaryrefslogtreecommitdiff
path: root/ports/unix/main.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-10-08 13:11:23 +1100
committerDamien George <damien@micropython.org>2025-11-22 00:06:59 +1100
commitfd1ddc3f12b40e99faaf24dd099fd512fddcb62c (patch)
tree12fc4905df5d0e7fada2e47c11f64426bdbd3318 /ports/unix/main.c
parente06ac9ce089c5eda9cbd9ec035cdf56fe75be0ab (diff)
shared/runtime/pyexec: Call mp_hal_stdio_mode_orig/raw as appropriate.
This ensures that ctrl-C works on the unix port when executing code at the REPL. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/unix/main.c')
-rw-r--r--ports/unix/main.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/ports/unix/main.c b/ports/unix/main.c
index dec3f90de..55fd8406b 100644
--- a/ports/unix/main.c
+++ b/ports/unix/main.c
@@ -193,7 +193,6 @@ static int do_repl(void) {
// use MicroPython supplied readline-based REPL
int ret = 0;
- mp_hal_stdio_mode_raw();
for (;;) {
if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) {
if ((ret = pyexec_raw_repl()) != 0) {
@@ -205,7 +204,6 @@ static int do_repl(void) {
}
}
}
- mp_hal_stdio_mode_orig();
return ret;
#else