more eating CPU
Denys Vlasenko
vda.linux at googlemail.com
Mon Dec 13 13:28:27 UTC 2010
On Thu, Dec 9, 2010 at 10:07 AM, Joakim Tjernlund
<joakim.tjernlund at transmode.se> wrote:
>
> We noticed a hung more command, consuming 100% CPU. strace
> showed this:
>
> write(1, "\r "..., 114) = -1 EIO (Input/output error)
> read(3, "", 4096) = 0
> write(1, "\r "..., 114) = -1 EIO (Input/output error)
> read(3, "", 4096) = 0
> write(1, "\r "..., 114) = -1 EIO (Input/output error)
> read(3, "", 4096) = 0
> write(1, "\r "..., 114) = -1 EIO (Input/output error)
> read(3, "", 4096) = 0
> write(1, "\r "..., 114) = -1 EIO (Input/output error)
> read(3, "", 4096) = 0
> write(1, "\r "..., 114) = -1 EIO (Input/output error)
> read(3, "", 4096) = 0
> write(1, "\r "..., 114) = -1 EIO (Input/output error)
> read(3, "", 4096) = 0
> write(1, "\r "..., 114) = -1 EIO (Input/output error)
>
> This is on BusyBox v1.14.2, I know it is a bit old but I figured I report it anyway.
Can you confirm that this is a working fix?
}
/* My small mind cannot fathom backspaces and UTF-8 */
putchar(c);
+
+ if (ferror(stdout)) /* if tty was destroyed
(closed xterm, etc) */
+ goto end;
}
fclose(file);
fflush_all();
} while (*argv && *++argv);
end:
--
vda
More information about the busybox
mailing list