diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-12-26 14:42:19 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-12-26 14:45:35 -0800 |
commit | 3c125eb21946e1f6bf8f22f4169baafb7f07bf60 (patch) | |
tree | bb61b4a97a2bdb4f882a8855772d3ab743b7f83b /pkg/sentry/kernel/kernel.go | |
parent | 5b9034cc18cb515f9534b61c7e4fe3c2a12985bc (diff) |
Initial procfs implementation in VFSv2
Updates #1195
PiperOrigin-RevId: 287227722
Diffstat (limited to 'pkg/sentry/kernel/kernel.go')
-rw-r--r-- | pkg/sentry/kernel/kernel.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/kernel.go b/pkg/sentry/kernel/kernel.go index bd3fb4c03..8653d2f63 100644 --- a/pkg/sentry/kernel/kernel.go +++ b/pkg/sentry/kernel/kernel.go @@ -762,7 +762,7 @@ func (k *Kernel) CreateProcess(args CreateProcessArgs) (*ThreadGroup, ThreadID, mounts.IncRef() } - tg := k.newThreadGroup(mounts, args.PIDNamespace, NewSignalHandlers(), linux.SIGCHLD, args.Limits, k.monotonicClock) + tg := k.NewThreadGroup(mounts, args.PIDNamespace, NewSignalHandlers(), linux.SIGCHLD, args.Limits) ctx := args.NewContext(k) // Get the root directory from the MountNamespace. @@ -1191,6 +1191,11 @@ func (k *Kernel) GlobalInit() *ThreadGroup { return k.globalInit } +// TestOnly_SetGlobalInit sets the thread group with ID 1 in the root PID namespace. +func (k *Kernel) TestOnly_SetGlobalInit(tg *ThreadGroup) { + k.globalInit = tg +} + // ApplicationCores returns the number of CPUs visible to sandboxed // applications. func (k *Kernel) ApplicationCores() uint { |