diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-12-26 22:57:46 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-12-26 22:57:46 +0000 |
commit | a69bbf7322da8463898947dce0d9ce840551efa4 (patch) | |
tree | 446d13b4d3258e6454e93617bcd0750ee3038394 /pkg/sentry/kernel/kernel.go | |
parent | 4961ac2da8dc89adc80339420d65b12f6f687aed (diff) | |
parent | 3c125eb21946e1f6bf8f22f4169baafb7f07bf60 (diff) |
Merge release-20191213.0-54-g3c125eb (automated)
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 { |