|
From: | Paul Eggert |
Subject: | [bug-diffutils] bug#20062: bug#20062: bug#20062: [PATCH] diff: add support for --color |
Date: | Thu, 12 Mar 2015 07:44:56 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
Giuseppe Scrivano wrote:
is it ok for now to keep these calls to sigprocmask and fix all the other issues you reported (until the ls.c code is Gnulib-ized)?
Sure, if removing sigprocmask calls is merely an efficiency thing. (It may be that the cost of the sigprocmask calls is not significant, so we can leave them in.) Correctness is the bigger problem here.
Another possibility is to refuse to output colors to a terminal. That would simplify a lot of things; we wouldn't need to worry about signals at all.
A third possibility is to have a signal handler that resets the terminal (using 'write' not 'fwrite', to make it async-signal-safe). That should remove the need for sigprocmask.
[Prev in Thread] | Current Thread | [Next in Thread] |