MCPcopy Create free account
hub / github.com/prometheus/procfs / Executable

Method Executable

proc.go:175–182  ·  view source on GitHub ↗

Executable returns the absolute path of the executable command of a process.

()

Source from the content-addressed store, hash-verified

173
174// Executable returns the absolute path of the executable command of a process.
175func (p Proc) Executable() (string, error) {
176 exe, err := os.Readlink(p.path("exe"))
177 if os.IsNotExist(err) {
178 return "", nil
179 }
180
181 return exe, err
182}
183
184// Cwd returns the absolute path to the current working directory of the process.
185func (p Proc) Cwd() (string, error) {

Callers 1

TestExecutableFunction · 0.80

Calls 1

pathMethod · 0.95

Tested by 1

TestExecutableFunction · 0.64