Giuseppe Scrivano wrote:
the
most it can hang is the time needed to print a single line.
There's no limit on line length though, right? Other than available memory. So
this could be a problem. ('ls' doesn't have a similar problem, if I understand
it correctly, as OSes typically have reasonably short limits on file name length.)
>Also, 'diff --color' needn't mess with signal handling unless isatty
>(fileno (outfile)).
Should this also be done if --color=always is used?
Yes. diff needs to mess with signal handling only if both (1) diff is
outputting colors and (2) the output is a terminal. This is independent of why
diff is doing (1).