metal-cos/sbin/init/init.c
2023-08-20 19:04:28 -04:00

23 lines
441 B
C

#include <stdio.h>
#include <syscall.h>
int
main(int argc, const char *argv[])
{
uint64_t status;
fputs("Init spawning shell\n", stdout);
const char *args[] = { "/bin/shell", NULL };
status = OSSpawn("/bin/shell", &args[0]);
if (status > 100) {
printf("init: Could not spawn shell %016lx\n", status);
}
while (1) {
status = OSWait(0);
printf("init: Zombie process exited (%016lx)\n", status);
}
}