package reexec

import "github.com/dotcloud/docker/pkg/reexec"

Package reexec facilitates the busybox style reexec of the docker binary that we require because of the forking limitations of using Go. Handlers can be registered with a name and the argv 0 of the exec of the binary will be used to find and execute custom init paths.

Index

Functions

func Command

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

Command returns *exec.Cmd which has Path as current binary. For example if current binary is "docker.exe" at "C:\", then cmd.Path will be set to "C:\docker.exe".

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. Uses os.Args[0].

Source Files

command_windows.go reexec.go

Version
v26.0.2+incompatible
Published
Apr 18, 2024
Platform
windows/amd64
Imports
4 packages
Last checked
1 hour ago

Tools for package owners.