mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
@@ -201,8 +201,18 @@ func startMonitorShutdownSignal(onExitFn onExitFunc) error {
|
||||
if err != nil {
|
||||
errorIf(errors.New("Unable to reboot."), err.Error())
|
||||
}
|
||||
// Successfully forked.
|
||||
onExitFn(int(exitSuccess))
|
||||
}
|
||||
|
||||
// Enable profiler if ``MINIO_PROFILER`` is set.
|
||||
switch os.Getenv("MINIO_PROFILER") {
|
||||
case "cpu", "mem", "block":
|
||||
// Stop any running profiler.
|
||||
globalProfiler.Stop()
|
||||
}
|
||||
|
||||
// Exit as success if no errors.
|
||||
onExitFn(int(exitSuccess))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user