From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladislav Shpilevoy Subject: [PATCH v2 09/10] session: enable box.session.push in local console Date: Fri, 20 Apr 2018 16:24:34 +0300 Message-Id: <726ffb60f6524f15439f035416b22d173bd93d1f.1524228894.git.v.shpilevoy@tarantool.org> In-Reply-To: References: In-Reply-To: References: To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com List-ID: It is quite simple - just use stdout file descriptor as the destination for push messages. It is needed to make remote and local console be similar. --- src/box/lua/console.c | 1 + src/box/lua/console.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/box/lua/console.c b/src/box/lua/console.c index c4886db8c..fcbaf299d 100644 --- a/src/box/lua/console.c +++ b/src/box/lua/console.c @@ -448,6 +448,7 @@ tarantool_lua_console_init(struct lua_State *L) /* .sync = */ generic_session_sync, }; session_vtab_registry[SESSION_TYPE_CONSOLE] = console_session_vtab; + session_vtab_registry[SESSION_TYPE_REPL] = console_session_vtab; } /* diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua index b8ae5ba59..b15ca145a 100644 --- a/src/box/lua/console.lua +++ b/src/box/lua/console.lua @@ -355,7 +355,7 @@ local function start() self.history_file = home_dir .. '/.tarantool_history' internal.load_history(self.history_file) end - session_internal.create(-1, "repl") + session_internal.create(1, "repl") repl(self) started = false end -- 2.15.1 (Apple Git-101)