**Describe what's wrong**
Query in clickhouse-client may fail with options `--send_logs_level=trace --server_logs_file=-` (`--server_logs_file=-` means write server logs to stdout).

**How to reproduce**

```
while true; do clickhouse-client -q "select 1" --send_logs_level=trace --server_logs_file=- >log; done
Code: 75. DB::ErrnoException: Cannot write to file (fd = 1), errno: 14, strerror: Bad address: (in query: select 1). (CANNOT_WRITE_TO_FILE_DESCRIPTOR)

Code: 75. DB::ErrnoException: Cannot write to file (fd = 1), errno: 14, strerror: Bad address: (in query: select 1). (CANNOT_WRITE_TO_FILE_DESCRIPTOR)

Code: 75. DB::ErrnoException: Cannot write to file (fd = 1), errno: 14, strerror: Bad address: (in query: select 1). (CANNOT_WRITE_TO_FILE_DESCRIPTOR)
```

Some queries will fail periodically.


{
            mutable_columns[col]->insert((*src.getByPosition(col).column)[pos]);
        }
    }
    dst.setColumns(std::move(mutable_columns));
}
std::atomic_flag exit_on_signal;
class QueryInterruptHandler : private boost::noncopyable
{
public:
    static void start() { exit_on_signal.clear(); }
    /// Return true if the query was stopped.
    static bool stop() { return 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 (QueryInterruptHandler::stop())
        safeExit(128 + signum);
}
/// To cancel the query on local format error.
class LocalFormatError : public DB::Exception
{
public:
    using Exception::Exception;
};
ClientBase::~ClientBase() = default;
ClientBase::ClientBase() = default;
void ClientBase::setupSignalHandler()