github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/internal/osutils/lockfile/test/integration/pidlock_lin_mac_test.go (about)

     1  // +build linux darwin
     2  
     3  package integration
     4  
     5  import (
     6  	"os"
     7  	"os/exec"
     8  	"testing"
     9  )
    10  
    11  func prepLockCmd(lockCmd *exec.Cmd) *exec.Cmd {
    12  	return lockCmd
    13  }
    14  
    15  func interruptProcess(t *testing.T, p *os.Process) {
    16  	err := p.Signal(os.Interrupt)
    17  	if err != nil {
    18  		t.Fatalf("Failed sending interrupt to process: %v", err)
    19  	}
    20  }