Merge branch 'ks1322-master'

This commit is contained in:
Alexey Milovidov 2017-12-19 21:04:40 +03:00
commit a8e44f34d0
4 changed files with 22 additions and 0 deletions

View File

@ -957,6 +957,7 @@ private:
String pager = config().getString("pager", "");
if (!pager.empty())
{
signal(SIGPIPE, SIG_IGN);
pager_cmd = ShellCommand::execute(pager, true);
out_buf = &pager_cmd->in;
}

View File

@ -0,0 +1 @@
Ok

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
expect $CURDIR/00532_pager_sigpipe.tcl && echo 'Ok' || echo 'Fail'

View File

@ -0,0 +1,15 @@
set timeout -1
log_user 0
spawn clickhouse-client --pager=head
expect ":) "
send "select name from system.settings union all select name from system.settings union all select name from system.settings union all select name from system.settings union all select name from system.settings union all select name from system.settings union all select name from system.settings union all select name from system.settings\r"
expect ":) "
send "quit\r"
expect eof