From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Subject: [Tarantool-patches] [PATCH v9 0/4] popen: add ability to run external process
Date: Fri, 10 Jan 2020 11:25:52 +0300 [thread overview]
Message-ID: <20200110082556.7617-1-gorcunov@gmail.com> (raw)
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
next reply other threads:[~2020-01-10 8:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 8:25 Cyrill Gorcunov [this message]
2020-01-10 8:25 ` [Tarantool-patches] [PATCH v9 1/4] coio: export helpers Cyrill Gorcunov
2020-01-10 8:25 ` [Tarantool-patches] [PATCH v9 2/4] popen: introduce a backend engine Cyrill Gorcunov
2020-01-10 8:25 ` [Tarantool-patches] [PATCH v9 3/4] popen/lua: add popen module Cyrill Gorcunov
2020-01-10 8:25 ` [Tarantool-patches] [PATCH v9 4/4] popen/test: add base test cases Cyrill Gorcunov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200110082556.7617-1-gorcunov@gmail.com \
--to=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v9 0/4] popen: add ability to run external process' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox