[Varnish] #1531: editline does not clean command line
Varnish
varnish-bugs at varnish-cache.org
Mon Jun 23 12:49:45 CEST 2014
#1531: editline does not clean command line
------------------------+-------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishadm | Version: trunk
Severity: normal | Keywords:
------------------------+-------------------
When using varnishadm to send commands to varnishd, varnishadm doesn't
clean the prompt after a command. The previous command is still visible in
the terminal after the prompt returns.
Expected result: varnishadm would restore the prompt to a clean state
(=="varnish > ") after each command that is run.
{{{
lkarsten at sierra:~$ varnishadm
200
-----------------------------
Varnish Cache CLI 1.0
-----------------------------
Linux,3.13.0-29-generic,x86_64,-smalloc,-smalloc,-hcritbit
varnish-4.0.1-rc1 revision 0e9bd49
Type 'help' for command list.
Type 'quit' to close CLI session.
varnish> help
200
help [command]
ping [timestamp]
[.. cut ..]
backend.list
backend.set_health matcher state
ban <field> <operator> <arg> [&& <field> <oper> <arg>]...
ban.list
varnish> helpbackend.list
varnish> backend.list
200
Backend name Refs Admin Probe
default(127.0.0.1,,8085) 1 probe Healthy 4/4
varnish> backend.listquit
varnish> quit
500
Closing CLI connection
}}}
The internal buffer is emptied, because pressing enter again makes
varnishadm return as no command was given.
TERM is xterm-color, ssh from urxvt to a ubuntu 14.04/trusty server.
{{{
lkarsten at sierra:~$ ldd /opt/varnish/bin/varnishadm
linux-vdso.so.1 => (0x00007fffd898c000)
libvarnishapi.so.1 => /opt/varnish/lib/libvarnishapi.so.1
(0x00007fb015796000)
libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2
(0x00007fb015557000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb015250000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fb015032000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb014c6c000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3
(0x00007fb014a2d000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1
(0x00007fb014825000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
(0x00007fb0145fc000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb0159cc000)
lkarsten at sierra:~$
lkarsten at sierra:~$ dpkg -l | grep libedit
ii libedit-dev:amd64 3.1-20130712-2
amd64 BSD editline and history libraries (development files)
ii libedit2:amd64 3.1-20130712-2
amd64 BSD editline and history libraries
}}}
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1531>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list