MCPcopy
hub / github.com/opencontainers/runc / Add

Method Add

libcontainer/configs/namespaces_linux.go:106–113  ·  view source on GitHub ↗
(t NamespaceType, path string)

Source from the content-addressed store, hash-verified

104}
105
106func (n *Namespaces) Add(t NamespaceType, path string) {
107 i := n.index(t)
108 if i == -1 {
109 *n = append(*n, Namespace{Type: t, Path: path})
110 return
111 }
112 (*n)[i].Path = path
113}
114
115func (n *Namespaces) index(t NamespaceType) int {
116 for i, ns := range *n {

Callers 11

setupProcessPipesFunction · 0.80
recvttyMethod · 0.80
sdNotifyBarrierFunction · 0.80
TestIPCJoinPathFunction · 0.80
TestIPCBadPathFunction · 0.80
TestSharedPidnsInitKillFunction · 0.80
TestInitJoinPIDFunction · 0.80
TestCGROUPPrivateFunction · 0.80
CreateLibcontainerConfigFunction · 0.80

Calls 1

indexMethod · 0.95

Tested by 7

TestIPCJoinPathFunction · 0.64
TestIPCBadPathFunction · 0.64
TestSharedPidnsInitKillFunction · 0.64
TestInitJoinPIDFunction · 0.64
TestCGROUPPrivateFunction · 0.64