Close stdin after data has been copied

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi 2015-12-17 13:42:02 -08:00
parent 5faf2bd102
commit ae5c752449
2 changed files with 6 additions and 1 deletions

View file

@ -131,6 +131,7 @@ var StartCommand = cli.Command{
if state != nil {
term.RestoreTerminal(os.Stdin.Fd(), state)
}
stdin.Close()
}()
for {
e, err := events.Recv()
@ -335,6 +336,7 @@ var ExecCommand = cli.Command{
if state != nil {
term.RestoreTerminal(os.Stdin.Fd(), state)
}
stdin.Close()
}()
for {
e, err := events.Recv()