Merge pull request #32350 from vdemeester/start-stack-trap-earlier
Start the stack trap earlier for daemon
This commit is contained in:
commit
5f14f4a949
1 changed files with 8 additions and 8 deletions
|
@ -526,6 +526,14 @@ func NewDaemon(config *config.Config, registryService registry.Service, containe
|
|||
}
|
||||
}()
|
||||
|
||||
// set up SIGUSR1 handler on Unix-like systems, or a Win32 global event
|
||||
// on Windows to dump Go routine stacks
|
||||
stackDumpDir := config.Root
|
||||
if execRoot := config.GetExecRoot(); execRoot != "" {
|
||||
stackDumpDir = execRoot
|
||||
}
|
||||
d.setupDumpStackTrap(stackDumpDir)
|
||||
|
||||
if err := d.setupSeccompProfile(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -714,14 +722,6 @@ func NewDaemon(config *config.Config, registryService registry.Service, containe
|
|||
engineCpus.Set(float64(info.NCPU))
|
||||
engineMemory.Set(float64(info.MemTotal))
|
||||
|
||||
// set up SIGUSR1 handler on Unix-like systems, or a Win32 global event
|
||||
// on Windows to dump Go routine stacks
|
||||
stackDumpDir := config.Root
|
||||
if execRoot := config.GetExecRoot(); execRoot != "" {
|
||||
stackDumpDir = execRoot
|
||||
}
|
||||
d.setupDumpStackTrap(stackDumpDir)
|
||||
|
||||
return d, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue