From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4E78946970E for ; Fri, 10 Jan 2020 11:26:00 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id r19so1237854ljg.3 for ; Fri, 10 Jan 2020 00:26:00 -0800 (PST) From: Cyrill Gorcunov Date: Fri, 10 Jan 2020 11:25:52 +0300 Message-Id: <20200110082556.7617-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v9 0/4] popen: add ability to run external process List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml 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