[Tarantool-patches] [PATCH v9 0/4] popen: add ability to run external process

Cyrill Gorcunov gorcunov at gmail.com
Fri Jan 10 11:25:52 MSK 2020


In this series we provide a way to execute external binaries
from inside of Lua scripts, control children process and
communicate with their stdin/out/err streams.

In v9 I reworked the API using coio as main nonblocking
i/o engine and use diag_set where appropriate (v6,7,8 are
skipped for testing reasons).

Note that the patches:

- [PATCH v9 3/4] popen/lua: add popen module
- [PATCH v9 4/4] popen/test: add base test cases

are *NOT* for merging, we're still discussing API for lua
but I think we can safely merge the backend engine (ie first
two patches) without breaking anything and concentrate then
on Lua API and backend extensions.

Issue https://github.com/tarantool/tarantool/issues/4031
Branch https://github.com/tarantool/tarantool/tree/gorcunov/gh-4031-popen-9

Cyrill Gorcunov (4):
  coio: export helpers
  popen: introduce a backend engine
  popen/lua: add popen module
  popen/test: add base test cases

 src/CMakeLists.txt          |    2 +
 src/box/applier.cc          |    2 +-
 src/lib/core/CMakeLists.txt |    1 +
 src/lib/core/coio.h         |   18 +-
 src/lib/core/popen.c        | 1093 +++++++++++++++++++++++++++++++++++
 src/lib/core/popen.h        |  207 +++++++
 src/lua/init.c              |    4 +
 src/lua/popen.c             |  590 +++++++++++++++++++
 src/lua/popen.h             |   44 ++
 src/lua/popen.lua           |  523 +++++++++++++++++
 src/main.cc                 |    4 +
 test/app/popen.result       |  234 ++++++++
 test/app/popen.test.lua     |   91 +++
 13 files changed, 2807 insertions(+), 6 deletions(-)
 create mode 100644 src/lib/core/popen.c
 create mode 100644 src/lib/core/popen.h
 create mode 100644 src/lua/popen.c
 create mode 100644 src/lua/popen.h
 create mode 100644 src/lua/popen.lua
 create mode 100644 test/app/popen.result
 create mode 100644 test/app/popen.test.lua

-- 
2.20.1



More information about the Tarantool-patches mailing list