When redirecting "cat;" output to a pipe, CQP installs a signal handler to check for broken pipe signals, so the output loop can be aborted (important e.g. when displaying a large query result in the interactive pager). Other output commands with redirect – count, tabulate, etc. – fail to do so.
The signal handler code should be merged into the open_stream() and close_stream() functions in <cqp/output.h>. All CQP output commands that support redirects through this mechanism will then only have to check the global variable broken_pipe<cqp/output.h>.
Log in to post a comment.