summaryrefslogtreecommitdiff
path: root/sd_daemon/doc.go
blob: 8f1fb00ba1ef9bdd90c03a0a1dfc763d03711b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// 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.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// 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")