8 "dinit" is destined to eventually become a replacement "init" program for
9 Linux (and possibly other) systems. But it's not there yet.
11 However, dinit can be used as a general service monitor. Specifically it
12 can launch multiple services (generally, "daemon" processes, but see notes
13 below) in parallel, with dependency management (i.e. if one service's
14 operation depends on another, the latter service will be started first).
16 For "process" services (the only kind of service that v0.1 supports) dinit
17 can monitor the process corresponding to the service, and re-start it if it
18 dies. It does this in an intelligent way, first "rolling back" all dependent
19 services (which it will later re-start, if configured to do so).
24 The only type of service supported in v0.1 are "process" services. Process
25 services are so named because they run as a process which dinit launches
26 and monitors directly (this is opposed to "scripted" services, scheduled for
27 v0.5, which will be started and stopped with the aid of a script or other
28 program, and which cannot be directly monitored by dinit).
30 Many programs that you might want to run under dinit's supervision can run
31 either "in the foreground" or as a daemon ("in the background"), and the
32 choice is dictated by a command line switch (for instance the -D and -F
33 switches to Samba's "smbd"). Although it might seem counterintuitive,
34 the "foreground" mode should be used for programs registered as process
35 services in dinit; this allows dinit to monitor the process.
37 Process services are attractive due to the ease of monitoring (and
38 restarting) the service, however, they have one inherent problem, which is
39 that dinit cannot tell when the service is truly started. Once the process
40 has been launched, dinit assumes that the service has started, but in fact
41 there will be a short delay before the process sets itself up, starts
42 listening on sockets, etc; during this time any other process (including
43 one from a service listed as dependent) which tries to contact it will not
47 Things to document about current implementation
48 -----------------------------------------------
49 * logfiles won't work until filesystem mounted (/dev/null should, though)