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