MCPcopy Index your code
hub / github.com/keploy/keploy / GetSelfInodeNumber

Function GetSelfInodeNumber

pkg/agent/hooks/linux/utils.go:12–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10)
11
12func GetSelfInodeNumber() (uint64, uint64, error) {
13 p := filepath.Join("/proc", "self", "ns", "pid")
14
15 f, err := os.Stat(p)
16 if err != nil {
17 return 0, 0, fmt.Errorf("failed to stat %s for keploy pid namespace: %w", p, err)
18 }
19 st := f.Sys().(*syscall.Stat_t)
20 return st.Ino, uint64(st.Dev), nil
21}

Callers 2

TestGetSelfInodeNumberFunction · 0.85
loadMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestGetSelfInodeNumberFunction · 0.68