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>
* We usually use this when stdin is not a tty, for example:
* echo "ps" | script
*/
- int c = DEF_EOF;
+ char c = DEF_EOF;
- if (write_all(master, &c, 1)) {
+ if (write_all(master, &c, sizeof(char))) {
warn (_("write failed"));
fail();
}