Finish port of shim package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-10-05 15:07:20 -07:00
parent 0f33efb1f7
commit c76f883ccd
5 changed files with 424 additions and 90 deletions

View file

@ -139,6 +139,7 @@ func start(log *os.File) error {
p.stdinCloser.Close()
}
case 1:
// resize
if p.console == nil {
continue
}
@ -147,6 +148,11 @@ func start(log *os.File) error {
Height: uint16(msg.Height),
}
term.SetWinsize(p.console.Fd(), &ws)
case 2:
// signal
if err := syscall.Kill(p.pid(), msg.Width); err != nil {
writeMessage(log, "warn", err)
}
}
}
}