]> git.ipfire.org Git - thirdparty/util-linux.git/commit
script: Fix mangled EOF and hang on big endian
authorStanislav Brabec <sbrabec@suse.cz>
Thu, 14 May 2015 15:55:56 +0000 (17:55 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 15 May 2015 10:56:46 +0000 (12:56 +0200)
commit8fdc064ac3a0b302d8a90f1d80b2feb89ad7f064
tree5a281fe37a5666a998cf673020643ca7f5499136
parenta19876310ed96fd173958c36b1a5a48ebf5397da
script: Fix mangled EOF and hang on big endian

On s390 and other big endian machines, doinput() sends NUL instead of
EOF to the tty master. NUL does not even reach the slave, and it is
waiting for more data forever.

If STDIN is not a tty, the bug caused "^@" being into the log, and since
commit 032228c it also causes hang.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
term-utils/script.c