feat: add selfstoptarget and sigchldchild
This commit is contained in:
1 parent
67ea1f461e
commit
5585b11968
3 files changed
+122
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user