mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-09 08:42:33 -04:00
build differently for openbsd because we can't cross compile the process library
This commit is contained in:
parent
e59c122dff
commit
bf4394ee95
2 changed files with 24 additions and 0 deletions
14
background_check.go
Normal file
14
background_check.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// +build !openbsd
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/shirou/gopsutil/process"
|
||||
)
|
||||
|
||||
func checkProcess(currentPID int) (bool, error) {
|
||||
myProc, _ := process.NewProcess(int32(currentPID))
|
||||
bg, _ := myProc.Background()
|
||||
|
||||
return bg, nil
|
||||
}
|
||||
10
background_check_openbsd.go
Normal file
10
background_check_openbsd.go
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func openTTY() (packer.TTY, error) {
|
||||
return false, fmt.Errorf("cannot determine if process is backgrounded in " +
|
||||
"openbsd")
|
||||
}
|
||||
Loading…
Reference in a new issue