Giuseppe Scrivano wrote:
Would block signals between a set_*_color_context and reset_color_context be enough or do we need more granularity (there are many places where printf is used in the code)?
No, for reasons Eric described: output is buffered.I suggest looking at the source code of GNU ls and seeing how it does things. In normal execution it never blocks signals at all. (It temporarily blocks signals only when processing a signal.)
