INNER CODE UNIT · Go
handleSignal
NVIDIA/gpu-operator · cmd/nvidia-validator/main.go:415
func handleSignal() {
// Handle signals
stop := make(chan os.Signal, 1)
signal.Notify(stop, os.Interrupt,
syscall.SIGTERM, syscall.SIGHUP, syscall.SIGINT, syscall.SIGQUIT)
s := <-stop
log.Fatalf("Exiting due to signal [%v] notification for pid [%d]", s.String(), os.Getpid())
}
func validateFlags(ctx context.Context, cli *cli.Command) (context.Context, error) {
if componentFlag == "" {
return ctx, fmt.Errorf("invalid -c <component-name> flag: must not be empty string")
}
if !isValidComponent() {
return ctx, fmt.Errorf("invalid -c <component-name> flag value: %s", componentFlag)
}
if componentFlag == "plugin" {