From a5139091897c5bd8f43d0080d9770880b69a46f7 Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Sun, 5 Oct 2025 20:05:09 +0200 Subject: [PATCH] tb Fix handling CTRL+S --- user/tb/interp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user/tb/interp.c b/user/tb/interp.c index 1e6d5b7..7e36de7 100644 --- a/user/tb/interp.c +++ b/user/tb/interp.c @@ -6,6 +6,7 @@ #include "macros.h" extern PID_t PID; +extern Dev_t ps2kbdev; static InterpResult RES; @@ -214,11 +215,10 @@ bool interp_runstring(char *string, InterpResult **res, bool logcmds, bool inter processctl(app, PCTL_RUN, 0, 0, 0); - uint8_t b; while(processctl(app, PCTL_POLLSTATE, 0, 0, 0) != 4) { if (interactive) { - int32_t nrd = ipcpipe(PID, IPCPIPE_IN, IPCPIPE_READ, &b, 1); - if (nrd > 0 && b == C('S')) { + int32_t key = devctl(&ps2kbdev, DEV_PS2KBDEV_READCH, (uint8_t *)PID, 0, 0); + if (key > 0 && (uint8_t)key == C('S')) { processctl(app, PCTL_KILL, 0, 0, 0); goto cleanup; }