package reexec
import "github.com/docker/cli/components/engine/pkg/reexec"
Index ¶
- func Command(args ...string) *exec.Cmd
- func Init() bool
- func Register(name string, initializer func())
- func Self() string
Functions ¶
func Command ¶
Command returns *exec.Cmd which has Path as current binary. Also it setting SysProcAttr.Pdeathsig to SIGTERM. This will use the in-memory version (/proc/self/exe) of the current binary, it is thus safe to delete or replace the on-disk binary (os.Args[0]).
func Init ¶
func Init() bool
Init is called as the first part of the exec process and returns true if an initialization function was called.
func Register ¶
func Register(name string, initializer func())
Register adds an initialization func under the specified name
func Self ¶
func Self() string
Self returns the path to the current process's binary. Returns "/proc/self/exe".
Source Files ¶
- Version
- v17.10.0-ce-rc1+incompatible
- Published
- Oct 4, 2017
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 8 minutes ago –
Tools for package owners.