rpm/luaext
Zbigniew Jędrzejewski-Szmek 19fe0d9ae1 Add posix.redirect2null
This is useful to silence output in forked programs:
https://bugzilla.redhat.com/show_bug.cgi?id=1287918

Tested with the following scriptlet:
%post -p <lua>
pid = posix.fork()
if pid == 0 then
    assert(posix.exec("/bin/sed"))
elseif pid > 0 then
    posix.wait(pid)
end
pid = posix.fork()
if pid == 0 then
    posix.redirect2null(2)
    assert(posix.exec("/bin/awk"))
elseif pid > 0 then
    posix.wait(pid)
end

As expected, the error message from sed is printed, the error message
from awk is not.
2016-03-10 14:22:01 +01:00
..
Makefile.am Use pkg-config to find Lua + determine flags (ticket #88) 2011-03-28 12:54:42 +03:00
linit.c Start phasing out internal copy of Lua 2008-04-16 15:37:52 +03:00
linit.h Start phasing out internal copy of Lua 2008-04-16 15:37:52 +03:00
linit.lch Start phasing out internal copy of Lua 2008-04-16 15:37:52 +03:00
linit.lua Start phasing out internal copy of Lua 2008-04-16 15:37:52 +03:00
lposix.c Add posix.redirect2null 2016-03-10 14:22:01 +01:00
lposix.h Basic protection against Lua os.exit() and posix.exec() (ticket #167) 2010-11-15 09:49:14 +02:00
lrexlib.c Add lua 5.2 support. 2012-10-09 08:28:52 +03:00
lrexlib.h Start phasing out internal copy of Lua 2008-04-16 15:37:52 +03:00
modemuncher.c New gcc versions comlpain about undefined behaviour... 2010-04-12 12:11:05 +02:00
userconfig.c Use rpmConfigDir() instead of hardwired value in Lua initialization 2008-11-22 18:09:23 +02:00