summaryrefslogtreecommitdiff
path: root/pkg/adapter/terminal.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-02-12 11:10:55 +0100
committerValentin Rothberg <rothberg@redhat.com>2020-02-14 15:04:14 +0100
commit85b7374491e842c44bec3ce5ec800794cae10295 (patch)
treec45fa8df8796b3741094f796f56b66e9d4388e60 /pkg/adapter/terminal.go
parent156ce5cd7d6f0f1514d263a74ffe3dd42f7c7caf (diff)
downloadpodman-85b7374491e842c44bec3ce5ec800794cae10295.tar.gz
podman-85b7374491e842c44bec3ce5ec800794cae10295.tar.bz2
podman-85b7374491e842c44bec3ce5ec800794cae10295.zip
add pkg/signal
Add pkg/signal to deal with parts of signal processing and translating signals from string to numeric representations. The code has been copied from docker/docker (and attributed with the copyright) but been reduced to only what libpod needs (on Linux). Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/adapter/terminal.go')
-rw-r--r--pkg/adapter/terminal.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/adapter/terminal.go b/pkg/adapter/terminal.go
index 51b747d23..499e77def 100644
--- a/pkg/adapter/terminal.go
+++ b/pkg/adapter/terminal.go
@@ -3,9 +3,9 @@ package adapter
import (
"context"
"os"
- gosignal "os/signal"
+ "os/signal"
- "github.com/docker/docker/pkg/signal"
+ lsignal "github.com/containers/libpod/pkg/signal"
"github.com/docker/docker/pkg/term"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -33,7 +33,7 @@ func getResize() *remotecommand.TerminalSize {
// Helper for prepareAttach - set up a goroutine to generate terminal resize events
func resizeTty(ctx context.Context, resize chan remotecommand.TerminalSize) {
sigchan := make(chan os.Signal, 1)
- gosignal.Notify(sigchan, signal.SIGWINCH)
+ signal.Notify(sigchan, lsignal.SIGWINCH)
go func() {
defer close(resize)
// Update the terminal size immediately without waiting