Crinit -- Configurable Rootfs Init
minsetup.h File Reference

(2023-08-02, commit: 9434b31)

Header related to minimal early system setup. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int crinitSetupSystemFs (void)
 
int crinitForkZombieReaper (void)
 

Detailed Description

Header related to minimal early system setup.

Function Documentation

◆ crinitForkZombieReaper()

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.

Returns
-1 if fork() fails, 0 on success in the child process, parent process will never return

◆ crinitSetupSystemFs()

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.

Returns
0 on success, -1 on error