mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 05:46:16 +00:00
Fixes #30886
This commit is contained in:
parent
b5a85eb32f
commit
5eef6b8d91
@ -20,9 +20,28 @@ package procfs
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type ProcFS struct{}
|
||||||
|
|
||||||
|
func NewProcFS() ProcFSInterface {
|
||||||
|
return &ProcFS{}
|
||||||
|
}
|
||||||
|
|
||||||
// GetFullContainerName gets the container name given the root process id of the container.
|
// GetFullContainerName gets the container name given the root process id of the container.
|
||||||
func GetFullContainerName(pid int) (string, error) {
|
func (pfs *ProcFS) GetFullContainerName(pid int) (string, error) {
|
||||||
return "", fmt.Errorf("GetFullContainerName is unsupported in this build")
|
return "", fmt.Errorf("GetFullContainerName is unsupported in this build")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Find process(es) using a regular expression and send a specified
|
||||||
|
// signal to each process
|
||||||
|
func PKill(name string, sig syscall.Signal) error {
|
||||||
|
return fmt.Errorf("PKill is unsupported in this build")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find process(es) with a specified name (exact match)
|
||||||
|
// and return their pid(s)
|
||||||
|
func PidOf(name string) ([]int, error) {
|
||||||
|
return []int{}, fmt.Errorf("PidOf is unsupported in this build")
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user