[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;
   errno = e;  
   return pushresult(L, r, NULL);

Reply to this email directly or view it on GitHub:
-------------- 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