2 - document security issue if pid file is not correctly protected (via access
6 - We've replaced libev, so that we don't abort on failure. But now exceptions
7 can be thrown when we register an event watch - need to handle these.
8 - Service I/O / child process waits need to be audited.
10 * Long-running "on console" services will back up the circular log buffer.
11 The buffer should just be flushed instead.
12 * When a PROCESS service process dies, and smooth_recovery is false, probably
13 need to force-stop dependents even if the process itself was stopped
15 * Complete control socket handling and protocol
16 - support for listing all services and their state
17 * Implement a control utility to start/stop services after dinit has started
18 - very basic version exists, needs thorough cleanup
22 * Perhaps need a way to prevent script services from re-starting.
23 (eg there's no need to mount filesystems twice; there might be various other
24 system initialisations that can't or shouldn't really be "undone" and so do
25 not need to be re-done).
26 * Documentation including sample service definitions
27 * Better error handling, logging of errors (largely done, still some patches
28 of code where it may be missing).
29 * Write wtmp entry on startup (see simpleinit)
30 * Allow running services as a different UID
31 * On linux when running with PID != 1, write PID to /proc/sys/kernel/cad_pid so
32 that we still receive SIGINT from ctrl+alt+del (must be done after /proc is
33 mounted, possibly could be left to a service script)
36 * Internationalisation
37 * More logging options. Can currently log to syslog only (well, with the
38 syslog protocol, to /dev/log). Possibly should be able to log directly
39 to a file, or input stream of another process.
40 * A service can prevent shutdown/reboot by failing to stop. Maybe make
41 multiple CTRL-ALT-DEL presses (or ^C since that's more portable) commence
42 immediate shutdown (or launch a simple control interface).
43 * Interruptible scripted services - where it's ok to terminate the start
44 script with a signal (and return the service to the STOPPED state). So a long-
45 running filesystem check, for instance, need not hold up shutdown.
46 * When we take down a service or tty session, it would be ideal if we could kill
47 the whole process tree, not just the leader process.
48 * Investigate using cn_proc netlink connector (cn_proc.h) to receive process
49 termination events even when running with PID != 1 (Linux only).
50 Also, there is the possibility of having a small, simple PID-1 init which
51 sends terminated process IDs over a pipe to Dinit. Finally, it may be possible
52 to run dinit (and subprocesses) in a new PID namespace (again linux-only).
53 * Allow logging tasks to memory (growing or circular buffer) and later
54 switching to disk logging (allows for filesystem mounted readonly on boot).
55 But perhaps this really the responsibility of another daemon.
56 * Rate control on process respawn
57 * Allow running services with different resource limits, chroot, cgroups,
58 namespaces (pid/fs/uid), etc
59 * Make default control socket location build-time configurable
60 * Allow specifying a timeout for killing services; if they don't die within
61 the timeout (after a TERM) then hit them with a KILL.
63 Even later / Maybe never:
64 * Support recognising /etc/init.d services automatically (as script services, with
65 no dependency management - or upstart compatible dependency management)
66 Also BSD's rc.d style scripts (PROVIDE, REQUIRE).
67 * Place some reasonable, soft limit on the number of services to be started
68 simultaneously, to prevent thrashing. Services that are taking a long time
69 to start don't count to the limit. Maybe use CPU/IO usage as a controlling
71 * Cron-like tasks (if started, they run a sub-task periodically. Stopping the
72 task will wait until the sub-task is complete).
73 * Allow to run services attached to virtual tty, allow connection to that tty (ala "screen").
74 * SystemD-like handling of filesystem mounts (see autofs documentation in kernel)
75 i.e. a mount point gets an autofs attached, and lazily gets mounted when accessed
76 (or is mounted in parallel). Probably put the functionality in a separate daemon.
80 * Design philosophy/rationale document
81 * Coding style guidelines
83 * What's the best TERM setting? gogetty gives me "linux" but I think other variants may be
84 better (eg "linux-c").
86 * Figure out the ConsoleKit/logind / PolicyKit mess & how dinit needs to fit into it.
87 * Consolekit/logind tracks "sessions". Provides a mechanism to mark a session starting,
88 associates processes with sessions, provides calls to terminate sessions etc (why?!!)
89 Can use environment variable or cgroups to track processes in a session.
90 A PAM module exists to create/destroy sessions.
91 * Consolekit/logind also allows for requesting shutdown, reboot, and inhibiting reboot
93 * "seats" are a set of input/output hardware (mouse/keyboard/monitor) on which a session
94 can be run. You can have multiple sessions on a seat - one is in the foreground
95 (eg linux virtual ttys implement multiple sessions on a single seat).
96 Sessions can run without a seat (eg ssh session).