tb running cmds in interactive mode
This commit is contained in:
@ -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';
|
||||
|
Reference in New Issue
Block a user