[Rpm-maint] [rpm] Add lua function posix.close (#44)
Zbigniew Jędrzejewski-Szmek
notifications at github.com
Wed Mar 2 19:32:32 UTC 2016
```
if (!have_forked)
return luaL_error(L, "exec not permitted in this context");
fd = open('/dev/null', 'w');
if (fd == 2)
return pushresult(L, 1, NULL);
r = dup2(fd, 2);
e = errno;
close(fd);
errno = e;
return pushresult(L, r, NULL);
```
---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/44#issuecomment-191388866
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20160302/5bc3fae1/attachment.html>
More information about the Rpm-maint
mailing list