From dbd0c3349f7aab94563f9d6950e558ea547911f8 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Fri, 3 May 2024 12:12:46 -0700 Subject: [PATCH 1/2] libct/system: rm Execv This is not used since commit dac41717. Signed-off-by: Kir Kolyshkin --- libcontainer/system/linux.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libcontainer/system/linux.go b/libcontainer/system/linux.go index 0b3b4da33d7..368364baf04 100644 --- a/libcontainer/system/linux.go +++ b/libcontainer/system/linux.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "os" - "os/exec" "strconv" "syscall" "unsafe" @@ -36,14 +35,6 @@ func (p ParentDeathSignal) Set() error { return SetParentDeathSignal(uintptr(p)) } -func Execv(cmd string, args []string, env []string) error { - name, err := exec.LookPath(cmd) - if err != nil { - return err - } - return Exec(name, args, env) -} - func Exec(cmd string, args []string, env []string) error { for { err := unix.Exec(cmd, args, env) From bac506463d48faca55baefbeb0e9ec7068088ad3 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Fri, 3 May 2024 12:15:58 -0700 Subject: [PATCH 2/2] libct: fix a comment Do not refer to the function which was removed. Signed-off-by: Kir Kolyshkin --- libcontainer/standard_init_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/standard_init_linux.go b/libcontainer/standard_init_linux.go index 4447032cf59..4b7aa677509 100644 --- a/libcontainer/standard_init_linux.go +++ b/libcontainer/standard_init_linux.go @@ -167,7 +167,7 @@ func (l *linuxStandardInit) Init() error { } } - // Tell our parent that we're ready to Execv. This must be done before the + // Tell our parent that we're ready to exec. This must be done before the // Seccomp rules have been applied, because we need to be able to read and // write to a socket. if err := syncParentReady(l.pipe); err != nil {