github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/internal/peer/node/signals.go (about)

     1  //go:build !windows
     2  // +build !windows
     3  
     4  /*
     5  Copyright IBM Corp. All Rights Reserved.
     6  
     7  SPDX-License-Identifier: Apache-2.0
     8  */
     9  
    10  package node
    11  
    12  import (
    13  	"os"
    14  	"syscall"
    15  
    16  	"github.com/osdi23p228/fabric/common/diag"
    17  )
    18  
    19  func addPlatformSignals(sigs map[os.Signal]func()) map[os.Signal]func() {
    20  	sigs[syscall.SIGUSR1] = func() { diag.LogGoRoutines(logger.Named("diag")) }
    21  	return sigs
    22  }