Skip to content

tty: move IO of master pty to be done with epoll#1455

Merged
mrunalp merged 3 commits intoopencontainers:masterfrom
dqminh:epoll-io
Sep 11, 2017
Merged

tty: move IO of master pty to be done with epoll#1455
mrunalp merged 3 commits intoopencontainers:masterfrom
dqminh:epoll-io

Conversation

@dqminh
Copy link
Contributor

@dqminh dqminh commented May 19, 2017

Fix #1434
Fix #1446

Using edge-triggered event with epoll to make sure that we can still cope with
the other side temporarilt goes away.

@crosbymichael
Copy link
Member

@dqminh thanks, i'll help test this one

@dqminh dqminh force-pushed the epoll-io branch 3 times, most recently from 0bb6adf to 5a9d1c5 Compare May 25, 2017 23:19
@dqminh
Copy link
Contributor Author

dqminh commented May 25, 2017

@crosbymichael CI looks fine now after a few more fixes. I did some manual testings too and things look ok.

@crosbymichael
Copy link
Member

Thanks, i'll test tomorrow

@mrunalp
Copy link
Contributor

mrunalp commented May 27, 2017

Nice, I'll test this as well.

tty.go Outdated
r.Close()
}

type EpollConsole struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we maybe move this into a package that can be imported as every client that does detach will have to implement this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this needs a doc comment describing what it does, because I know the next time I'm going to have to touch this code it's going to be a fun time.

@rhatdan
Copy link
Contributor

rhatdan commented Jun 29, 2017

Any movement on this patch?

@dqminh
Copy link
Contributor Author

dqminh commented Jun 29, 2017

@rhatdan oops, sorry for the delay, i'm preparing a patch to move epoll for console lib so its usable outside runc, then i will update this PR with the new changes.

@dqminh
Copy link
Contributor Author

dqminh commented Jul 12, 2017

@crosbymichael @cyphar @mrunalp updated with changes from containerd/console. With containerd/console#14 i think we will have everything we need.

@crosbymichael
Copy link
Member

@dqminh merged your console PR

@dqminh dqminh force-pushed the epoll-io branch 2 times, most recently from 0889aad to 024eaaf Compare July 17, 2017 09:22
@dqminh
Copy link
Contributor Author

dqminh commented Jul 17, 2017

rebased on master and updated vendor.conf to latest console rev.

@dqminh
Copy link
Contributor Author

dqminh commented Jul 26, 2017

poke @opencontainers/runc-maintainers

@crosbymichael crosbymichael added this to the 1.0.0 milestone Jul 26, 2017
@crosbymichael
Copy link
Member

crosbymichael commented Jul 27, 2017

LGTM

Approved with PullApprove

dqminh added 3 commits July 28, 2017 12:35
This moves all console code to use github.com/containerd/console library to
handle console I/O. Also move to use EpollConsole by default when user requests
a terminal so we can still cope when the other side temporarily goes away.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
Signed-off-by: Daniel Dao <dqminh89@gmail.com>
This removes usages of docker/pkg/term to set raw terminal, handle interrupt
and restore the terminal, and instead use containerd/console and handle
interrupt ourselves.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
@dqminh
Copy link
Contributor Author

dqminh commented Jul 31, 2017

ping @cyphar @mrunalp

@dqminh
Copy link
Contributor Author

dqminh commented Aug 17, 2017

ping @opencontainers/runc-maintainers

@crosbymichael
Copy link
Member

crosbymichael commented Sep 6, 2017

LGTM

Approved with PullApprove

1 similar comment
@mrunalp
Copy link
Contributor

mrunalp commented Sep 11, 2017

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit d5b43c3 into opencontainers:master Sep 11, 2017
@TomasTomecek
Copy link

@dqminh++ Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants