Skip to content

nerdctl reliance on containerd/console SetRaw is resulting in spurious carriage returns (unix.OPOST) #4053

Closed

Description

@apostasie

Description

Because of that, when using ptys, we end-up with double CR.

This is likely because of containerd/console SetRaw method which does enable unix.OPOST.
I do not know why console is doing that.
Crosby added this in containerd/console@362934a

I will send a PR here on nerdctl to bypass calling console.SetRaw and instead just use term.MakeRaw and see if it causes any unexpected side-effects.

Steps to reproduce the issue

unbuffer docker run -it --rm ghcr.io/stargz-containers/alpine:3.13-org sh -c "echo" | hexdump
0000000 0a0d
0000002

vs.

unbuffer nerdctl run -it --rm ghcr.io/stargz-containers/alpine:3.13-org sh -c "echo" | hexdump
0000000 0d0d 000a
0000003

Describe the results you received and expected

nerdctl should not do that.

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/unconfirmed-bug-claim

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions