Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 1ce4312

Browse files
committed
pod: fix the issue of missing execId for resize container tty
Signed-off-by: fupan <[email protected]>
1 parent 9f39555 commit 1ce4312

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

daemon/pod/pod.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,13 @@ func (p *XPod) TtyResize(cid, execId string, h, w int) error {
499499
p.Log(ERROR, err)
500500
return err
501501
}
502+
503+
//if doesn't specify the execId, it means to ttyresize the container's
504+
//tty, thus the execId is the same with the container id for Kata container.
505+
if execId == "" {
506+
execId = cid
507+
}
508+
502509
return p.sandbox.WinsizeProcess(cid, execId, uint32(h), uint32(w))
503510
}
504511

0 commit comments

Comments
 (0)