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

+26
View File
@@ -0,0 +1,26 @@
#include "ulib.h"
/*
* Only ever spawned by sigtest.c. Installs no handler at all, so the
* sigTerm sigtest.c sends it must run the OTHER branch of
* signal.c's sigConsumePending: default disposition, which
* isr.c's deliverPendingSignals turns into a real threadExit -- proving a
* signal with no handler actually terminates its target (exit code
* 128+signum, see isr.c), not just that a handler-based one can be caught.
* Reaching the FAIL print below would mean the default-terminate path
* never fired at all.
*/
int main(void)
{
print("sigdefault: start, pid=");
printDec(userGetpid());
print("\n");
print("sigdefault: waiting to be terminated by default disposition\n");
for (int i = 0; i < 40; i++)
userSleep(20);
print("sigdefault: FAIL still alive after default-disposition signal\n");
return 1;
}