summaryrefslogtreecommitdiff
path: root/sd_daemon/doc.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-18 03:20:47 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-18 03:20:47 -0500
commit3b1bdfbd2687e81bef85260f9cdfbf617ece3527 (patch)
tree93f2c45e6e616ab63e5fb21f4d2a740d8b9b05e2 /sd_daemon/doc.go
parenteb6e8a6ca87879a6ca85788fcf6d3bf8848088e6 (diff)
Implement almost all of sd-daemon. BREAKING CHANGES.v0.2.0
This does not include the sd_is_* utility functions. BREAKING CHANGES: - The import name is now "sd_daemon" instead of "sd". - The logger interface is now entirely different. - Notify now takes more arguments.
Diffstat (limited to 'sd_daemon/doc.go')
-rw-r--r--sd_daemon/doc.go26
1 files changed, 23 insertions, 3 deletions
diff --git a/sd_daemon/doc.go b/sd_daemon/doc.go
index 665e25e..8f1fb00 100644
--- a/sd_daemon/doc.go
+++ b/sd_daemon/doc.go
@@ -1,4 +1,4 @@
-// Copyright 2015 Luke Shumaker
+// Copyright 2015-2016 Luke Shumaker
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,5 +12,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package sd provides APIs for systemd new-style daemons.
-package sd
+// Package sd_daemon provides functions for writing "new-style"
+// daemons.
+//
+// The daemon(7) manual page has historically documented the very long
+// list of things that a daemon must do at start-up to be a
+// well-behaved SysV daemon. Modern service managers allow daemons to
+// be much simpler; modern versions of the daemon(7) page on GNU/Linux
+// systems also describe "new-style" daemons. Though many of the
+// mechanisms described there and implemented here originated with
+// Systemd, they are all very simple mechanisms which can easily be
+// implemented with a variety of service managers.
+//
+// [daemon(7)]: https://www.freedesktop.org/software/systemd/man/daemon.html
+package sd_daemon
+
+import "errors"
+
+// ErrDisabled is the error returned when the service manager does not
+// want/support a mechanism; or when that mechanism has been disabled
+// for this process by setting unsetEnv=true when calling one of these
+// functions.
+var ErrDisabled = errors.New("Mechanism Disabled")