[Tarantool-patches] [PATCH 3/7] box/console: Add explicit output EOS mapping

Alexander Turenko alexander.turenko at tarantool.org
Fri Oct 25 12:53:12 MSK 2019


On Fri, Oct 25, 2019 at 10:40:12AM +0300, Cyrill Gorcunov wrote:
> On Fri, Oct 25, 2019 at 03:00:22AM +0300, Alexander Turenko wrote:
> > 
> > Should not we wait for ';\n'?
> 
> Strictly speaking ; is only eos, the newline is needed for terminal
> driver. But currently what we have might confuse a user, so I think
> you are probably right. Need to think and revisit this moment. Thanks!

We use this approach for reading of a client input on a remote server:
see client_read() in src/box/lua/console.lua ('\r' here to handle telnet
connections, see fa1aa01e49f323557fc981f7a76d85f99a9c7990).

Those delimiter was introduced before implementing local_check_lua(),
which works on a client side (both for local console and a client for a
remote console): when a delimiter is not set, we read input line by line
and try to parse it as a Lua statement using loadstring().

There are some flaws however:
https://github.com/tarantool/tarantool/issues/4082

I suspect the latter approach is not usable for cases where we have no
Lua interpreter on a client side (say, for test-run); I mentioned it to
provide more broad information.


More information about the Tarantool-patches mailing list