Add debug.SetTraceback for runsc-gofer

The -traceback flag sets the Debug.SetTraceback for runsc-sandbox.
We need this for gofer too. Fixes #7583
This commit is contained in:
Nafeez
2022-05-16 12:54:24 -07:00
parent f2a57c9dac
commit ba4d645163
+4
View File
@@ -20,6 +20,7 @@ import (
"fmt"
"os"
"path/filepath"
"runtime/debug"
"strings"
"github.com/google/subcommands"
@@ -99,6 +100,9 @@ func (g *Gofer) Execute(_ context.Context, f *flag.FlagSet, args ...interface{})
conf := args[0].(*config.Config)
// Set traceback level
debug.SetTraceback(conf.Traceback)
specFile := os.NewFile(uintptr(g.specFD), "spec file")
defer specFile.Close()
spec, err := specutils.ReadSpecFromFile(g.bundleDir, specFile, conf)