feat: add selfstoptarget and sigchldchild

This commit is contained in:
dualfroz committed 2026-09-09 15:42:48 +02:00
1 parent 67ea1f461e
commit 5585b11968
3 files changed
+122

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
#include "ulib.h"
/*
* Only ever spawned by sigchldtest.c. Does nothing rendezvous-shaped
* (unlike eintrtarget.c/masktarget.c's own targets) because it does not
* need to: sigchldtest.c's own proof (a real sigChld raised by the kernel
* against whoever spawned this process, sched.c's parentId/threadExit)
* does not depend on any particular ordering between this process's own
* death and sigchldtest.c noticing it -- sigRaise sets the pending bit on
* the parent unconditionally, whatever its state is at that instant, and
* sigchldtest.c's own bounded poll loop (the same "check a flag every
* userSleep(20)" idiom masktarget.c/nesttarget.c already use) picks it up
* on its very next natural wake either way. Just runs and exits with a
* distinctive code sigchldtest.c can verify through userWait after the
* fact.
*/
int main(void)
{
print("sigchldchild: start, pid=");
printDec(userGetpid());
print("\n");
print("sigchldchild: exiting now\n");
return 84;
}