io: stop screwing with \n in console output
io: stop screwing with \n in console output

The default terminal setting for a new pty on Linux (unix98) has +ONLCR,
resulting in '\n' writes by a container process to be converted to
'\r\n' reads by the managing process. This is quite unexpected, To fix it, make
the terminal sane after opening it by setting -ONLCR.

this patch fix method comes from: https://github.com/opencontainers/runc/commit/eea28f480db435dbef4a275de9776b9934818b8c
thanks @cyphar Aleksa Sarai <asarai@suse.de>

Signed-off-by: Wang Long <e68b6ff438429ca41648c25d0f54e970cf858504@huawei.com>

chanezon/containerd,thaJeztah/containerd,dmcgowan/containerd,AkihiroSuda/containerd,rajasec/containerd,Wolphin-project/containerd,containerd/containerd,lichao-mobanche/containerd,mikebrow/containerd,yuexiao-wang/containerd,dmcgowan/containerd,vdemeester/containerd,kunalkushwaha/containerd,kunalkushwaha/containerd,estesp/containerd,crosbymichael/containerd,estesp/containerd,hqhq/containerd,crosbymichael/containerd,xiekeyang/containerd,miaoyq/containerd,containerd/containerd,miaoyq/containerd,docker/containerd,mikebrow/containerd,thaJeztah/containerd,vdemeester/containerd