[Rpm-maint] [rpm] Add lua function posix.close (#44)
notifications at github.com
Thu Jan 28 13:14:27 UTC 2016
This pull request is not sufficient to fix the problem. For one there is no io.open in rpm's lua so far. Also we probably do not want random scriptlets to mess with with the file descriptors of the rpm process. So this would need some kind of protection (as we already added to exec and exit).
It might need to be a bit more complex, though, as permitting file operations only after forking is kinda strange.
Also your proposed script relies on io.open("/dev/null") returning 2 as it assumes that this is the lowest free file descriptor. This is really ugly and probably unreliable. A proper solution would be to use dup2 (also not available).
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rpm-maint