Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
NAME
setinit — become and locate initDESCRIPTION
setinit() sets the current process as the init process for itself and its subsequently created descendant processes. setinit() runs setsid(2) to create a new session (and process group) and can fail for the same reasons as setsid(2).RETURN VALUES
setinit() returns the pid of the init process (the current process) on success, or -1 on error and error is set appropriately.ERRORS
setinit() will fail if:- EPERM
- The process is already a process group leader, a session leader, or an init process.
- ESRCH
- The process specified in pid does not exist.