mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00

Looks like this is a forgotten part of commit 9bb191df5 ("[CI:MACHINE]Podman5 QEMU refactor"). The reason is, linters for Windows skip pkg/machine/qemu, and linters for freebsd are not run at all. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
35 lines
716 B
Go
35 lines
716 B
Go
//go:build windows
|
|
|
|
package qemu
|
|
|
|
import (
|
|
"bytes"
|
|
"fmt"
|
|
|
|
"github.com/containers/podman/v5/pkg/machine"
|
|
)
|
|
|
|
func isProcessAlive(pid int) bool {
|
|
return checkProcessStatus("process", pid, nil) == nil
|
|
}
|
|
|
|
func checkProcessStatus(processHint string, pid int, stderrBuf *bytes.Buffer) error {
|
|
active, exitCode := machine.GetProcessState(pid)
|
|
if !active {
|
|
if stderrBuf != nil {
|
|
return fmt.Errorf("%s exited unexpectedly, exit code: %d stderr: %s", processHint, exitCode, stderrBuf.String())
|
|
} else {
|
|
return fmt.Errorf("%s exited unexpectedly, exit code: %d", processHint, exitCode)
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func sigKill(pid int) error {
|
|
return nil
|
|
}
|
|
|
|
func findProcess(pid int) (int, error) {
|
|
return -1, nil
|
|
}
|