A library binding various POSIX APIs. POSIX is the IEEE Portable Operating System Interface standard. luaposix is based on lposix.
I am happy to announce release 36.2.1 of luaposix.
If you have moved to the documented APIs, and don't rely on the Lua backwards compatibility layer or convenience functions, you can safely omit Lua module dependencies and use the C layer only.
luaposix's home page is at https://github.com/luaposix/luaposix/, with documentation at https://luaposix.github.io/luaposix.
Noteworthy changes in release 36.2.1 (2023-06-16) [stable]
Incompatible Changes
-
Using latest typecheck and specl rocks requires that our argument errors list all typenames in full ("integer" not "int") and unions in order ("nil or string" not "string or nil".
All luaposix APIs now report argument type errors accordingly.
Bugs Fixed
-
posix.unistd.read
andposix.sys.socket.recv
no longer hide the underlying real error by casting a ssize_t result into an unsigned site_t local. -
Fix a typo in the
lflag
argument name in the termios table LDocs. -
posix.sys.*
submodules are correctly preloaded into the module table returned byrequire 'posix'
so that this undocumented, deprecated and slow way to access the functions therein continues to work for now:local posix = require 'posix' local stat = posix.sys.stat.stat
For new code, consider this fast and documented alternative, that does not load every available luaposix API from disk (especially if your project does not use APIs from every luaposix module):
local stat = require 'posix.sys.stat'.stat
-
Removed
IUTF8
from the documented list of supportediflag
values inposix.termios
because it was previously unimplemented. Implemented non-portable support as an XSI extension, as it isn't a part of the POSIX standard.
Install it with LuaRocks, using:
luarocks install luaposix 36.2.1