| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| [ANN] luaposix v38 released source code.tar.gz | 2026-10-26 | 173.6 kB | |
| [ANN] luaposix v38 released source code.zip | 2026-10-26 | 297.4 kB | |
| README.md | 2026-10-26 | 5.5 kB | |
| Totals: 3 Items | 476.5 kB | 0 | |
Lua bindings for POSIX
I am happy to announce release 38 of luaposix.
luaposix's home page is at https://github.com/luaposix/luaposix/
Noteworthy changes in release 38 (2026-10-25) [stable]
New Features
-
New
posix.time.tzset, to apply a change of theTZenvironment variable, as intzset(3). -
The
flagsargument ofposix.glob.globis optional, and defaults to 0, as does the pattern to*. -
posix.unistd.getoptreturns the option character at fault, in place of the alwaysnilargument, when it returns?or:for an unrecognized option or a missing argument. -
New
posix.unistd.exece, to execute a program with a specified environment, as inexecve(2). -
Support for XSI extensions
WIFCONTINUEDandWCONTINUEDinposix.sys.wait.
Bugs Fixed
-
Integer fields of tables passed to functions, such as
tv_secandtv_nsecofposix.time.nanosleep, truncate a float towards zero, as they always have in Lua 5.1, 5.2 and LuaJIT, rather than becoming 0 in Lua 5.3 and later. -
The
opterrargument ofposix.unistd.getoptis documented as what it is, a flag that makesgetoptprint diagnostics tostderr, not the index of an option with an error, and its usage example runs. -
The usage examples of
posix.fcntl.fcntl,posix.fcntl.openandposix.sys.stat.chmodrun: they named the wrong module forfcntl,F_GETFL,S_IRWXUandS_IRGRP, and calledbit.borwithout saying where it comes from. -
The LDoc reference of
posix.grp.getgrgid,posix.grp.getgrnam,posix.pwd.getpwnamandposix.pwd.getpwuidsays that they return justnil, not an error message, when the group or user does not exist. -
The
msqidargument ofposix.sys.msg.msgctl, the values to set withIPC_SET, is in the LDoc reference, where its documentation had been left out.
Incompatible Changes
-
luaposix is built from the
buildtable of its rockspec, by theluarocks-build-lukeLuaRocks build backend, which LuaRocks installs for the build, so there is nobuild-aux/lukebuild to run, and no build without LuaRocks. The rock does not build LDocs, whichluke releasebuilds and commits. -
The undocumented
posix.deprecatedmodule is gone, along with the legacy APIs it added to theposixmodule in place of the submodule functions of the same names, which were kept for compatibility with luaposix 32 and earlier. Calling one of them from theposixmodule raises an error naming its replacement:Removed Use instead bindposix.sys.socket.bindclock_getresposix.time.clock_getresclock_gettimeposix.time.clock_gettimeconnectposix.sys.socket.connectexecposix.unistd.execexecpposix.unistd.execpfadviseposix.fcntl.posix_fadvisefnmatchposix.fnmatch.fnmatchgetgroupposix.grp.getgrgidorposix.grp.getgrnamgetpasswdposix.pwd.getpwuidorposix.pwd.getpwnamgetpidposix.unistd.getpidgetrlimitposix.sys.resource.getrlimitgettimeofdayposix.sys.time.gettimeofdaygmtimeposix.time.gmtimehostidposix.unistd.gethostidisgraphposix.ctype.isgraphisprintposix.ctype.isprintlocaltimeposix.time.localtimemktimeposix.time.mktimenanosleepposix.time.nanosleepopenlogposix.syslog.openlogpathconfposix.unistd.pathconfsetrlimitposix.sys.resource.setrlimitstatposix.sys.stat.lstatstatvfsposix.sys.statvfs.statvfsstrftimeposix.time.strftimestrptimeposix.time.strptimesysconfposix.unistd.sysconftimesposix.sys.times.timesunameposix.sys.utsname.unameThe replacements take and return the POSIX structures, rather than selecting fields by name; luaposix 37.0 is the last release with the old APIs.
Bugs Fixed
-
posix.unistd.getoptaccepts any number of arguments. Previously, an argument list longer than about 20 entries could overflow the Lua stack and corrupt memory, and more than 252 failed outright. -
Installing a release rockspec no longer rebuilds the LDocs that the release already includes, so an installed ldoc that fails, as luarocks.org's does with Lua 5.5, no longer breaks the install.
Install it with LuaRocks, using:
luarocks install luaposix 38