**Describe the situation**

```
SELECT * FROM test.hits INTO OUTFILE 'dump.csv' FORMAT CSV

8873898 rows in set. Elapsed: 32.487 sec. Processed 8.87 million rows, 8.46 GB (273.15 thousand rows/s., 260.42 MB/s.)
```

is bounded by single CPU core. Too slow :(
{
public:
    QueryInterruptHandler() { exit_on_signal.clear( }
    ~QueryInterruptHandler() { exit_on_signal.test_and_set( }
    static bool cancelled() { return exit_on_signal.test( }
};
/// This signal handler is set only for sigint.
void interruptSignalHandler(int signum)
{
    if (exit_on_signal.test_and_set())
        _exit(signum
}
ClientBase::~ClientBase() = default;
ClientBase::ClientBase() = default;
void ClientBase::setupSignalHandler()
{
     exit_on_signal.test_and_set(
     struct sigaction new_act;
     memset(&new_act, 0, sizeof(new_act)
     new_act.sa_handler = interruptSignalHandler;
     new_act.sa_flags = 0;
#if defined(OS_DARWIN)
    sigemptyset(&new_act.sa_mask
#else
     if (sigemptyset(&new_act.sa_mask))
        throw Exception(ErrorCodes::CANNOT_SET_SIGNAL_HANDLER, "Cannot set signal handler."
#endif