Description of problem: Scriptlets often need to redirect output to /dev/null, for example when calling external programs. How to do this in lua without starting a shell? This works in plain lua but not in rpm: posix = require 'posix' pid = posix.fork() if pid == 0 then posix.close(2) posix.open("/dev/null") assert(posix.exec("/bin/systemctl", "daemon-reload")) elseif pid > 0 then posix.wait(pid) end I asked on the mailing list, but got not response: http://lists.rpm.org/pipermail/rpm-ecosystem/2015-November/000287.html
https://github.com/rpm-software-management/rpm/pull/44
Please can you react on comment in pull request.
Yeah, sorry for the delay. It's on my list.
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
https://github.com/rpm-software-management/rpm/commits/19fe0d9ae12644b8af9513aa2a8cf7d16f7caa61
Your pull request was accepted upstream and I also pushed patch into rawhide (rpm-4.13.0-0.rc1.27.fc25) and I am closing this bug. If you need this to be fixed also in f24, f23 or f22 then please reopen this bug.
If F24 was possible, that'd be great.
rpm-4.13.0-0.rc1.26.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fbc487888f
rpm-4.13.0-0.rc1.26.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-fbc487888f
rpm-4.13.0-0.rc1.26.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.