Improve terminal reuse and attach

Currently attach and the editor do not share the same logic for saving
and restoring the terminal, and are not suitable for nesting (when the
caller wants to create something, attach, and then delete something when
the attach is over).  This commit moves the interrupt protection logic
to a util package and supports nesting interrupt handlers.
This commit is contained in:
Clayton Coleman
2016-02-20 13:53:11 -05:00
parent 4d98abf26c
commit 3a29e3971b
7 changed files with 242 additions and 106 deletions

View File

@@ -208,7 +208,7 @@ func TestAttachWarnings(t *testing.T) {
pod: attachPod(),
stdin: true,
tty: true,
expectedErr: "Unable to use a TTY - container bar doesn't allocate one",
expectedErr: "Unable to use a TTY - container bar did not allocate one",
},
}
for _, test := range tests {