activatecmd

package
v7.0.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearEnv

func ClearEnv(env []string) (ret []string)

ClearEnv removes all items from an environment list that might be interpreted as a notification socket or inherited fd

func DaemonStopping

func DaemonStopping() error

DaemonStopping is used by the child process to indicate it is no longer serving requests and will exit soon.

Types

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

Listener implements a channel that receives ready notifications from spawned processes

func (*Listener) Attach

func (l *Listener) Attach(cmd *exec.Cmd) (detach func(), err error)

Attach a notification socket to a new child process. The returned "detach" function must be invoked on cleanup, and should be invoked after Start() returns.

func (*Listener) Close

func (l *Listener) Close() error

Close shuts down all notification sockets

func (*Listener) Ready

func (l *Listener) Ready() <-chan int

Ready returns a channel that receives PIDs that are ready

func (*Listener) Stopping

func (l *Listener) Stopping() <-chan int

Stopping returns a channel that receives PIDs that are stopping

type ListenerSet

type ListenerSet struct {
	// contains filtered or unexported fields
}

func NewListenerSet

func NewListenerSet(listeners []net.Listener) (*ListenerSet, error)

NewListenerSet prepares a set of listeners that can be attached to child processes.

The underyling files are duplicated, so the original Listener objects can be closed if desired.

func (*ListenerSet) Attach

func (s *ListenerSet) Attach(cmd *exec.Cmd) error

Attach all the listeners in the set to a new child process.

func (*ListenerSet) Close

func (s *ListenerSet) Close() error

Close frees the extra file descriptors owned by the listener set

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL