Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Update
util-linux.4110
util-linux-script-mangled-EOF-big-endian.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File util-linux-script-mangled-EOF-big-endian.patch of Package util-linux.4110
From 8fdc064ac3a0b302d8a90f1d80b2feb89ad7f064 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec <sbrabec@suse.cz> Date: Thu, 14 May 2015 17:55:56 +0200 Subject: [PATCH] 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/term-utils/script.c b/term-utils/script.c index 02ba596..e0083f2 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -377,9 +377,9 @@ doinput(void) { * 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(); } -- 2.3.7
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor