CE process watching WIP

This commit is contained in:
2026-03-18 15:30:41 +01:00
parent 76b1533ad0
commit 77ab25bcee
18 changed files with 110 additions and 39 deletions

View File

@@ -3,7 +3,6 @@ include ../make/ufuncs.mk
$(eval $(call add_lib,libterminal))
$(eval $(call add_lib,libprocess))
$(eval $(call add_lib,libstring))
$(eval $(call add_lib,libkb))
$(eval $(call add_lib,libdebugconsole))
$(eval $(call add_lib,libaux))
$(eval $(call add_lib,libmalloc))

View File

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