github.com/akashshinde/docker@v1.9.1/pkg/reexec/command_freebsd.go (about) 1 // +build freebsd 2 3 package reexec 4 5 import ( 6 "os/exec" 7 ) 8 9 // Self returns the path to the current process's binary. 10 // Uses os.Args[0]. 11 func Self() string { 12 return naiveSelf() 13 } 14 15 // Command returns *exec.Cmd which have Path as current binary. 16 // For example if current binary is "docker" at "/usr/bin/", then cmd.Path will 17 // be set to "/usr/bin/docker". 18 func Command(args ...string) *exec.Cmd { 19 return &exec.Cmd{ 20 Path: Self(), 21 Args: args, 22 } 23 }