service: add various accessors.
[oweals/dinit.git] / TODO
diff --git a/TODO b/TODO
index 6fb10735f7ebbdada8e6fc6a3fcad4288b31e202..a3db9b01c6fa83b4f72577062320ee821e6f8dde 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,21 +1,37 @@
-* shutdown command presently hangs if terminal output blocked (scroll lock
-  via ^S). Should use a buffer as dinit does, and pipe output from subcommands
-  via the buffer too - if the buffer becomes full, discard subcommand output
-  and continue to consume it.
-
+For version 0.3.0:
+------------------
+* Skippable services: if they terminate via ^C, treat as a successful startup. Allows
+  skipping filesystem checks.
+* Provide better status information:
+  - whether a service failed to start (as opposed to just being STOPPED)
+    - directly, and how (error code? died to signal? timed out?) or
+    - due to a dependency.
+  - whether a service has acquired, or is waiting to acquire, the console
+  - whether service was skipped (via ^C/SIGINT) instead of started normally.
+* Option to send signals to service process leader only (not to process group).
+  
 For version 1.0:
 ----------------
+* Support S6-style startup notification (write to fd)
 * Man pages for all programs (done for dinit, not for dinitctl/shutdown/etc).
 * Write wtmp entry on startup (see simpleinit)
 * "triggered" service type: external process notifies Dinit when the service
-  has started.
-* Some way to specify environment (perhaps a common environment for all
-  processes)
-* Load services from several different directories, with an order of precedence,
-  to allow for packaged service descriptions and user-modified service
-  descriptions.
+  has started. (maybe?)
 * on shutdown, after repeated intervals with no activity, display information
-  about services we are waiting on.
+  about services we are waiting on (or, do this when prompted via ^C or C-A-D).
+* A (perhaps limited) way(s) to modify a service description after it is loaded -
+  eg add/remove dependencies, change properties.
+* Think about detecting runs-on-console dependency conflicts (i.e. if A runs-on-console and
+  B depends on A and runs-on-consle then B can never start)?
+  - Complicated if service descriptions can be altered after loading. Perhaps not necessary
+    if better status information can be provided.
+* Documentation must be complete (see section below).
+* Package-manager-friendly way to enable/disable services.
+  Perhaps a service can specify a dependency file (with dependency type) where
+  the file contains a list of service names, or if it is a directory, each
+  filename within corresponds to a service that is a dependency.
+* Proper support for socket activation?
+* Be able to boot and shutdown Linux and FreeBSD.
 
 For later:
 ----------
@@ -27,37 +43,27 @@ For later:
    system initialisations that can't or shouldn't really be "undone" and so do
    not need to be re-done).
 * Internationalisation
-* More logging options. Can currently log to syslog only (well, with the
-  syslog protocol, to /dev/log). Possibly should be able to log directly
-  to a file, or input stream of another process.
 * A service can prevent shutdown/reboot by failing to stop. Maybe make
   multiple CTRL-ALT-DEL presses (or ^C since that's more portable) commence
   immediate shutdown (or launch a simple control interface).
-* Interruptible scripted services - where it's ok to terminate the start
-  script with a signal (and return the service to the STOPPED state). So a long-
-  running filesystem check, for instance, need not hold up shutdown.
 * When we take down a service or tty session, it would be ideal if we could kill
   the whole process tree, not just the leader process (need cgroups or pid
   namespace or other mechanism).
-* Investigate using cn_proc netlink connector (cn_proc.h) to receive process
-  termination events even when running with PID != 1 (Linux only).
-  Also, there is the possibility of having a small, simple PID-1 init which
-  sends terminated process IDs over a pipe to Dinit. Finally, it may be possible
-  to run dinit (and subprocesses) in a new PID namespace (again linux-only).
 * Allow logging tasks to memory (growing or circular buffer) and later
   switching to disk logging (allows for filesystem mounted readonly on boot).
   But perhaps this really the responsibility of another daemon.
 * Allow running services with different resource limits, chroot, cgroups,
   namespaces (pid/fs/uid), etc
-* Make default control socket location build-time configurable
-* Allow specifying a timeout for killing services; if they don't die within
-  the timeout (after a TERM) then hit them with a KILL.
-* A (perhaps limited) way(s) to modify a service description after it is loaded -
-  eg add/remove dependencies, change properties.
-* Think about detecting runs-on-console dependency conflicts (i.e. if A runs-on-console and
-  B depends on A and runs-on-consle then B can never start).
+* Support chaining service output to another process (logger) input; if the
+  service dies the file descriptor of its stdout isn't closed and is reassigned
+  when the service is restarted, so that minimal output is lost.
+  - even more, it would be nice if a single logger process could be responsible
+    for receiving output from multiple services. This would require some kind of
+    protocol for passing new output descriptors to the logger (for when a
+    service starts).
 
 Even later / Maybe never:
+-------------------------
 * Support recognising /etc/init.d services automatically (as script services, with
   no dependency management - or upstart compatible dependency management)
   Also BSD's rc.d style scripts (PROVIDE, REQUIRE).
@@ -74,6 +80,7 @@ Even later / Maybe never:
 
 
 Documentation:
+--------------
 * Design philosophy/rationale document
 * Coding style guidelines