mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
fix bad import path for cmd/podman/utils
Libpod or packages under /pkg should never import from /cmd/... This will quickly result in import cycles and weird code paths. Also there is no reason to use this special code we can just use syscall.SIGHUB as SIGNAL. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -1,15 +0,0 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package utils
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// Platform specific signal synonyms
|
||||
var (
|
||||
SIGHUP os.Signal = unix.SIGHUP
|
||||
)
|
@ -1,15 +0,0 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package utils
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
// Platform specific signal synonyms
|
||||
var (
|
||||
SIGHUP os.Signal = windows.SIGHUP
|
||||
)
|
@ -9,9 +9,9 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"sync"
|
||||
"syscall"
|
||||
|
||||
"github.com/containers/common/pkg/cgroups"
|
||||
"github.com/containers/podman/v4/cmd/podman/utils"
|
||||
"github.com/containers/podman/v4/libpod"
|
||||
"github.com/containers/podman/v4/pkg/domain/entities"
|
||||
"github.com/containers/podman/v4/pkg/namespaces"
|
||||
@ -375,7 +375,7 @@ func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []strin
|
||||
func StartWatcher(rt *libpod.Runtime) {
|
||||
// Setup the signal notifier
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, utils.SIGHUP)
|
||||
signal.Notify(ch, syscall.SIGHUP)
|
||||
|
||||
go func() {
|
||||
for {
|
||||
|
Reference in New Issue
Block a user