Skip to content

Commit

Permalink
fix bad import path for cmd/podman/utils
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luap99 committed May 30, 2022
1 parent a550af2 commit a6f8cad
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 deletions.
15 changes: 0 additions & 15 deletions cmd/podman/utils/signals_linux.go

This file was deleted.

15 changes: 0 additions & 15 deletions cmd/podman/utils/signals_windows.go

This file was deleted.

4 changes: 2 additions & 2 deletions pkg/domain/infra/runtime_libpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a6f8cad

Please sign in to comment.