weixin_39646970
2020-12-27 16:57 阅读 6

tty:Do not set current tty as controlling tty for shim in standalone mode

Added detailed explanation in the comments. This is to prevent the shell from losing its controlling tty. I thought of overcoming this problem by having the runtime gain control of the tty once the shim has ended. But if the runtime is sent a SIGKILL in standalone, the shell would never get its tty back.

In any case, I feel we should not be causing any ill effects on the user's running shell. We should have the runtime create a slave pts in standalone mode and pass that to the shim in 3.0(runc creates a tty as well and prevents the current shell from being used)

A limitation introduced with this change is that the shim does not get the SIGWINCH signals and these are not propogated to hyperstart. I plan to add this limitation to the wiki once this is approved.

Signed-off-by: Archana Shinde

该提问来源于开源项目:intel/cc-oci-runtime

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

7条回答 默认 最新

  • weixin_39688035 weixin_39688035 2020-12-27 16:57

    qa-failed

    Rejected with PullApprove

    点赞 评论 复制链接分享
  • weixin_39758048 weixin_39758048 2020-12-27 16:57

    did you check why the QA was failing ?

    点赞 评论 复制链接分享
  • weixin_39688035 weixin_39688035 2020-12-27 16:57

    These were the functional tests that are currently failing in 2.1 branch ( is working on these failures). Docker tests were hanged, but this is already fixed with latest commit on the branch, so maybe a rebase will make docker tests pass.

    点赞 评论 复制链接分享
  • weixin_39814482 weixin_39814482 2020-12-27 16:57

    So, I'm not a big fan of losing the SIGWINCH handling for a corner case where we reuse the current shell. How important it really is that we can reuse the current shell? if it's only for the tests and in "standalone" mode, we could do what runc does (apparently), creating a new pty.

    点赞 评论 复制链接分享
  • weixin_39758048 weixin_39758048 2020-12-27 16:57

    , maybe you should tag this PR as do-not-merge until is back, to continue this conversation ?

    点赞 评论 复制链接分享
  • weixin_39814482 weixin_39814482 2020-12-27 16:57

    yes, we should.

    点赞 评论 复制链接分享
  • weixin_39814482 weixin_39814482 2020-12-27 16:57

    As discussed, closing that PR with issue #571 to track this. We may want to do what runc used to, have a special meaning for --console /dev/pts/ptmx

    点赞 评论 复制链接分享

相关推荐