get.porter.sh/porter@v1.3.0/pkg/plugins/pluggable/connection_nix.go (about)

     1  //go:build !windows
     2  
     3  package pluggable
     4  
     5  import (
     6  	"os"
     7  	"syscall"
     8  )
     9  
    10  // IsPluginRunning indicates is the plugin process is still running.
    11  // Used for testing only.
    12  func (c *PluginConnection) IsPluginRunning() bool {
    13  	if c.pluginCmd == nil || c.pluginCmd.Process == nil {
    14  		return false
    15  	}
    16  
    17  	// We are only defining this function for linux/darwin because windows doesn't have SIGCONT
    18  	err := c.pluginCmd.Process.Signal(os.Signal(syscall.SIGCONT))
    19  	return err == nil
    20  }