diff options
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r-- | runsc/boot/loader.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index 50cac0433..2fce800ae 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -191,6 +191,9 @@ func New(args Args) (*Loader, error) { return nil, fmt.Errorf("setting up memory usage: %v", err) } + // Sets the refs leak check mode + refs.SetLeakMode(args.Conf.ReferenceLeakMode) + // Create kernel and platform. p, err := createPlatform(args.Conf, args.Device) if err != nil { @@ -1040,8 +1043,3 @@ func (l *Loader) threadGroupFromIDLocked(key execID) (*kernel.ThreadGroup, *host } return ep.tg, ep.tty, nil } - -func init() { - // TODO(gvisor.dev/issue/365): Make this configurable. - refs.SetLeakMode(refs.NoLeakChecking) -} |