Crinit -- Configurable Rootfs Init
|
Implementation of minimal early system setup. More...
#include "minsetup.h"
#include <stdbool.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include "logio.h"
Functions | |
int | crinitForkZombieReaper (void) |
int | crinitSetupSystemFs (void) |
Implementation of minimal early system setup.
int crinitForkZombieReaper | ( | void | ) |
Forks the calling process, parent will enter a wait-loop, child will return.
Meant to be used during early startup if the calling process is PID 1. After the call, PID 1 will be in a permanent wait-loop to take care of orphaned processes. The new process will return from the funtion and go on.
int crinitSetupSystemFs | ( | void | ) |
Sets up devtmpfs, devpts, sysfs, procfs, and a tmpfs on /run
Meant to be used during early startup, so that necessary system interfaces are available.