summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-12-05 14:46:33 +0100
committerSebastiaan van Stijn <github@gone.nl>2023-04-30 20:44:17 +0200
commitc1d420ec6088ce53b4fd9a61bb1258d00a1730fc (patch)
treea3cc21be2c8aaf8d9b8c49e71ac5a762fcb342ea
parent0ea9305f99566cb8adf36ff04a28b9e949999254 (diff)
downloaddocker-c1d420ec6088ce53b4fd9a61bb1258d00a1730fc.tar.gz
vendor: github.com/moby/term v0.0.0-20221205130635-1aeaba878587
term: remove interrupt handler on termios On termios platforms, interrupt signals are not generated in raw mode terminals as the ISIG setting is not enabled. Remove interrupt handler as it does nothing for raw mode and prevents other uses of INT signal with this library. This code seems to go back all the way to moby/moby#214 where signal handling was improved for monolithic docker repository. Raw mode -ISIG got reintroduced in moby/moby@3f63b878076, but the INT handler was left behind. full diff: https://github.com/moby/term/compare/abb19827d345...1aeaba8785877a66f57739be9fccb6f5cfab429e Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
-rw-r--r--vendor.mod2
-rw-r--r--vendor.sum4
-rw-r--r--vendor/github.com/moby/term/term.go19
-rw-r--r--vendor/modules.txt2
4 files changed, 4 insertions, 23 deletions
diff --git a/vendor.mod b/vendor.mod
index 89baa1a291..8116d244b6 100644
--- a/vendor.mod
+++ b/vendor.mod
@@ -67,7 +67,7 @@ require (
github.com/moby/sys/sequential v0.5.0
github.com/moby/sys/signal v0.7.0
github.com/moby/sys/symlink v0.2.0
- github.com/moby/term v0.0.0-20221120202655-abb19827d345
+ github.com/moby/term v0.0.0-20221205130635-1aeaba878587
github.com/morikuni/aec v1.0.0
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
diff --git a/vendor.sum b/vendor.sum
index ee927970ca..d7b818a555 100644
--- a/vendor.sum
+++ b/vendor.sum
@@ -1072,8 +1072,8 @@ github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZ
github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs=
github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ=
-github.com/moby/term v0.0.0-20221120202655-abb19827d345 h1:J9c53/kxIH+2nTKBEfZYFMlhghtHpIHSXpm5VRGHSnU=
-github.com/moby/term v0.0.0-20221120202655-abb19827d345/go.mod h1:15ce4BGCFxt7I5NQKT+HV0yEDxmf6fSysfEDiVo3zFM=
+github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA=
+github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
diff --git a/vendor/github.com/moby/term/term.go b/vendor/github.com/moby/term/term.go
index 8c1fc1b5a5..2dd3d090df 100644
--- a/vendor/github.com/moby/term/term.go
+++ b/vendor/github.com/moby/term/term.go
@@ -7,10 +7,8 @@ package term
import (
"errors"
- "fmt"
"io"
"os"
- "os/signal"
"golang.org/x/sys/unix"
)
@@ -80,7 +78,6 @@ func DisableEcho(fd uintptr, state *State) error {
if err := tcset(fd, &newState); err != nil {
return err
}
- handleInterrupt(fd, state)
return nil
}
@@ -92,7 +89,6 @@ func SetRawTerminal(fd uintptr) (*State, error) {
if err != nil {
return nil, err
}
- handleInterrupt(fd, oldState)
return oldState, err
}
@@ -102,18 +98,3 @@ func SetRawTerminal(fd uintptr) (*State, error) {
func SetRawTerminalOutput(fd uintptr) (*State, error) {
return nil, nil
}
-
-func handleInterrupt(fd uintptr, state *State) {
- sigchan := make(chan os.Signal, 1)
- signal.Notify(sigchan, os.Interrupt)
- go func() {
- for range sigchan {
- // quit cleanly and the new terminal item is on a new line
- fmt.Println()
- signal.Stop(sigchan)
- close(sigchan)
- RestoreTerminal(fd, state)
- os.Exit(1)
- }
- }()
-}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 19513fb9cb..625e01c9c7 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -819,7 +819,7 @@ github.com/moby/sys/signal
# github.com/moby/sys/symlink v0.2.0
## explicit; go 1.16
github.com/moby/sys/symlink
-# github.com/moby/term v0.0.0-20221120202655-abb19827d345
+# github.com/moby/term v0.0.0-20221205130635-1aeaba878587
## explicit; go 1.18
github.com/moby/term
github.com/moby/term/windows