summaryrefslogtreecommitdiff
path: root/sd_daemon/listen_fds.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-09-18 17:45:34 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-18 17:45:34 -0400
commita9165016b8955d5ed48c7a3c58842b579d931fc6 (patch)
tree485d32f014a3dc4c4c6da847c653dfd7d1e589b1 /sd_daemon/listen_fds.go
parenta5bad9d6ec4ce526015403c9565efea58d2867ea (diff)
Massive documentation and copyright clean-up.
Diffstat (limited to 'sd_daemon/listen_fds.go')
-rw-r--r--sd_daemon/listen_fds.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/sd_daemon/listen_fds.go b/sd_daemon/listen_fds.go
index 45ef699..fbd2247 100644
--- a/sd_daemon/listen_fds.go
+++ b/sd_daemon/listen_fds.go
@@ -13,8 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package activation implements primitives for systemd socket activation.
-package sd_daemon
+package sd
import (
"os"
@@ -25,6 +24,15 @@ import (
//#include <systemd/sd-daemon.h>
import "C"
+// Returns a list of file descriptors passed in by the service manager
+// as part of the socket-based activation logic.
+//
+// If unsetEnv is true, then (regarless of whether the function call
+// itself succeeds or not) it will unset the environmental variables
+// LISTEN_FDS and LISTEN_PID, which will cause further calls to this
+// function to fail.
+//
+// In the case of an error, this function returns nil.
func ListenFds(unsetEnv bool) []*os.File {
if unsetEnv {
defer os.Unsetenv("LISTEN_PID")