pkg/reexec: make platform-agnostic (again)

The reexec package originally was platform-agnostic, but gained some
Linux-specific handling in 1cb17f03d0.

When Windows support was implemented in Docker, the pkg/reexec package
was adjusted accordingly in 64715c4f33,
which now made the package with with either Linux or Windows, with various
other platforms (freebsd, solaris, darwin) being added back in separate
changes.

Based on the history above, this package should be platform-agnostic, except
for Linux-specific changes introduced in 1cb17f03d0
and 5aee8807a6.

This patch:

- removes the stub-implementation to make it functional on other platforms.
- renames the files for consistency

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-12-17 10:46:07 +01:00
parent 7672d60033
commit 6568c06d12
3 changed files with 1 additions and 13 deletions

View File

@@ -1,12 +0,0 @@
//go:build !linux && !windows && !freebsd && !darwin
package reexec
import (
"os/exec"
)
// Command is unsupported on operating systems apart from Linux, Windows, and Darwin.
func Command(args ...string) *exec.Cmd {
return nil
}

View File

@@ -1,4 +1,4 @@
//go:build freebsd || darwin || windows
//go:build !linux
package reexec