CE process watching WIP
This commit is contained in:
12
init/init.c
12
init/init.c
@@ -1,5 +1,4 @@
|
||||
#include <debugconsole.h>
|
||||
#include <kb.h>
|
||||
#include <limits.h>
|
||||
#include <malloc.h>
|
||||
#include <process.h>
|
||||
@@ -30,14 +29,9 @@ void app_main (void) {
|
||||
int ce_pid = exec ("sys", "/ce");
|
||||
ce_pgid = get_procgroup (ce_pid);
|
||||
|
||||
process_spawn (&receiver, NULL);
|
||||
struct process_data* pdata = process_spawn (&receiver, NULL);
|
||||
|
||||
for (;;) {
|
||||
int ch = kb_read_key ();
|
||||
wait_for_pid (pdata->pid);
|
||||
|
||||
if (ch == 0)
|
||||
continue;
|
||||
|
||||
mail_send (ce_pgid, (uint8_t*)&ch, 1);
|
||||
}
|
||||
process_data_free (pdata);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user