From bb4f468b73c8a888bec1e5b2ba7f1575ab7f8456 Mon Sep 17 00:00:00 2001 From: user Date: Thu, 16 Jul 2026 11:15:12 +0200 Subject: jobs: background execution (&), non-blocking reap, spin demo - sys_reap: nohang reap of a finished zombie child (-> pid or 0). - shell: 'cmd &' launches in the background (prints [pid], no wait); reaps finished jobs at the prompt ([pid done]). Foreground now waits for its own child specifically (loops wait(), reporting bg completions meanwhile) so kill reports the right pid. - spin: a process that yields forever - a target for ps/kill. - verified: spin &; ps shows it; kill removes just that one; immortal init; self-finishing bg worker reaped with [pid done]. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e2a86eb..a3a4b2b 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ $(BUILD)/%.o: src/%.asm | $(BUILD) # C programs: compiled with SDCC into ROM-bank blobs and INCBIN'd by programs.asm CBLOBS := c/chello.bin c/echo.bin c/true.bin c/false.bin c/uname.bin \ c/pid.bin c/cat.bin c/wc.bin c/head.bin c/args.bin \ - c/ls.bin c/save.bin c/rm.bin c/sh.bin c/ps.bin c/kill.bin + c/ls.bin c/save.bin c/rm.bin c/sh.bin c/ps.bin c/kill.bin c/spin.bin $(BUILD)/programs.o: $(CBLOBS) # C programs also depend on the shared libc sources -- cgit v1.3.1-sl0p