IPCNamespaceFromContext returns the IPC namespace in which ctx is executing, or nil if there is no such IPC namespace. It takes a reference on the namespace.
(ctx context.Context)
| 80 | // or nil if there is no such IPC namespace. It takes a reference on the |
| 81 | // namespace. |
| 82 | func IPCNamespaceFromContext(ctx context.Context) *IPCNamespace { |
| 83 | if v := ctx.Value(ipc.CtxIPCNamespace); v != nil { |
| 84 | return v.(*IPCNamespace) |
| 85 | } |
| 86 | return nil |
| 87 | } |
| 88 | |
| 89 | // TaskFromContext returns the Task associated with ctx, or nil if there is no |
| 90 | // such Task. |
no test coverage detected
searching dependent graphs…