Compare commits

..

1 Commits

Author SHA1 Message Date
a513909189 tb Fix handling CTRL+S 2025-10-05 20:05:09 +02:00

View File

@ -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;
}