docker: Index | Files

package reexec

import ""


Package Files

command_linux.go reexec.go

func Command Uses

func Command(args ...string) *exec.Cmd

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 Uses

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 Uses

func Register(name string, initializer func())

Register adds an initialization func under the specified name

func Self Uses

func Self() string

Self returns the path to the current process's binary. Returns "/proc/self/exe".

Package reexec imports 6 packages (graph) and is imported by 3673 packages. Updated 2020-03-26. Refresh now. Tools for package owners.