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: eea28f480d
thanks @cyphar Aleksa Sarai <asarai@suse.de>
Signed-off-by: Wang Long <long.wanglong@huawei.com>