init

command
v0.0.0-...-eb0ba78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2017 License: MIT Imports: 10 Imported by: 0

README

Init

Init is a simple implementation Research Unix style init(8), loosely based on the Research Unix Version 7 init.

Notably, this implementation of init does not launch getty(8) processes, but rather uses per-tty goroutines to launch login(1) processes directly.

Phases

Init loops through a series of phases, in the following order:

1. Shutdown

The shutdown phase terminates any running session goroutines and kills all child processes. In case of a panic, the behaviour of init is to recover and start execution again from Phase 1. Thus, the shutdown phase is first to ensure that any running sessions are closed and all child processes are cleaned up.

2. Single-user

Launch a single sh(1) session with no authentication. To proceed to the next phase, send EOF by pressing ctl-d.

3. Runcom (Run Commands)

Execute the sh(1) program /etc/rc. This can be used for system initialization, starting daemons, etc.

4. Multi-user

Start a session per TTY. Switch between sessions by pressing ctl+alt+F1..FN. Each session begins by launching login(1). To end multi-user mode, close all sessions, and proceed to the shutdown phase; send SIGHUP to init: kill -HUP 1

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL