MCPcopy Index your code
hub / github.com/google/gvisor / WriteControlFiles

Method WriteControlFiles

pkg/sentry/control/cgroups.go:141–159  ·  view source on GitHub ↗

WriteControlFiles is an RPC stub for batch-writing cgroupfs control files.

(args *CgroupsWriteArgs, out *CgroupsResults)

Source from the content-addressed store, hash-verified

139
140// WriteControlFiles is an RPC stub for batch-writing cgroupfs control files.
141func (c *Cgroups) WriteControlFiles(args *CgroupsWriteArgs, out *CgroupsResults) error {
142 ctx := c.Kernel.SupervisorContext()
143
144 for _, arg := range args.Args {
145 cg, err := c.findCgroup(ctx, arg.File)
146 if err != nil {
147 out.appendError(err)
148 continue
149 }
150
151 err = cg.WriteControl(ctx, arg.File.Name, arg.Value)
152 if err != nil {
153 out.appendError(err)
154 } else {
155 out.appendValue("")
156 }
157 }
158 return nil
159}

Callers

nothing calls this directly

Calls 5

findCgroupMethod · 0.95
SupervisorContextMethod · 0.80
appendErrorMethod · 0.80
appendValueMethod · 0.80
WriteControlMethod · 0.65

Tested by

no test coverage detected