At this point, if you want to avoid using shell you have only option which is to use posix.fork() and posix.exec() which is too verbose and not optional (as Florian Weimer says, posix_spawn() can be implemented more efficiently than usual fork() / execve() sequence).
Typical use-case is shown below. -- Before pid = posix.fork() if pid == 0 then assert(posix.exec("/foo/bar")) elseif pid > 0 then posix.wait(pid) end -- After assert(posix.spawn("/foo/bar")) Fixes: https://github.com/rpm-software-management/rpm/issues/389 Signed-off-by: Igor Gnatenko <i.gnatenko.br...@gmail.com> --- And also fix small memory leak. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/390 -- Commit Summary -- * lua: add posix.spawn() * lua: fix few memory leaks -- File Changes -- M luaext/lposix.c (61) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/390.patch https://github.com/rpm-software-management/rpm/pull/390.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/390
_______________________________________________ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint