From 98efb82ec06a5b5c29dd6613351b3b0d91d8177f Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Thu, 15 Jul 2021 09:12:00 +0200 Subject: [PATCH] fixup! gluon-core: implement popen3() in gluon/util.lua --- package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua index 10ca582f..2db39161 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua @@ -241,12 +241,12 @@ function M.subprocess.popen(path, argt, options) null = posix_fcntl.open('/dev/null', posix_fcntl.O_RDWR) end - for iostream in pairs(stdiostreams) do + for iostream, fd in pairs(stdiostreams) do local option = options[iostream] if option == M.subprocess.DEVNULL then - posix_unistd.dup2(null, stdiostreams[iostream]) + posix_unistd.dup2(null, fd) elseif option == M.subprocess.PIPE then - posix_unistd.dup2(childfds[iostream], stdiostreams[iostream]) + posix_unistd.dup2(childfds[iostream], fd) end close_fds(childfds, parentfds) end