Implement streams IPC mechanism
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m47s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m47s
This commit is contained in:
7
ce/ce.c
7
ce/ce.c
@@ -14,6 +14,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <streams.h>
|
||||
#include <string.h>
|
||||
#include <system.h>
|
||||
#include <tcursor.h>
|
||||
@@ -77,10 +78,12 @@ void app_main (void) {
|
||||
mprintf (PROMPT);
|
||||
|
||||
for (;;) {
|
||||
int ch = kb_read_key ();
|
||||
uint8_t ch;
|
||||
|
||||
if (ch == 0)
|
||||
if (stream_read (process_get_pgid (), STREAM_IN, &ch, 1) <= 0) {
|
||||
sched ();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == '\n')
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user