tb running cmds in interactive mode

This commit is contained in:
2025-09-18 00:57:24 +02:00
parent b3894f1600
commit e5e707eb54
6 changed files with 23 additions and 8 deletions

View File

@ -105,9 +105,10 @@ void do_mode_interactive(void) {
string_memset(linebuf, 0, LINEBUF_MAX);
char c = 0;
while (c != '\n') {
int32_t rd = ipcpipe(IPCPIPE_SELFPID, IPCPIPE_IN, IPCPIPE_READ, (uint8_t *)&c, 1);
int32_t rd = ipcpipe(PID, IPCPIPE_IN, IPCPIPE_READ, (uint8_t *)&c, 1);
if (rd > 0 && cursor < LINEBUF_MAX) {
linebuf[cursor++] = c;
uprintf("%c", c);
}
}
linebuf[cursor - 1] = '\0';