feat: add eintrtarget and envprint

This commit is contained in:
dualfroz committed 2026-09-08 22:15:55 +02:00
1 parent 607eaff366
commit 6184cf43be
4 files changed
+179

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#include "ulib.h"
/*
* Never spawned directly by kmain.c or by proctest.c's userSpawn -- the
* only way this binary's "exectarget: running" line can ever appear in the
* boot log is if proctest.c's userExec("/bin/exectarget") call actually
* replaced proctest's own image with this one (see proctest.c). Its pid is
* therefore the SAME pid proctest was given at spawnUser time in kmain.c,
* which is what kmain.c's execReaperThread checks via threadJoin to prove
* exec() preserves process identity, not just that some program ran.
*/
int main(void)
{
print("exectarget: running, pid=");
printDec(userGetpid());
print("\n");
return 7;
}