lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


This is mostly a bug fix release.

* Fix sigtimedwait on OS X and OpenBSD.
* Fix strerror_r usage on Linux/glibc.
* Fix dh_lua Debian build on Ubuntu 12.04 and possibly other Debian
  derivatives.
* Fix treatment of raw integer descriptors.
* Improve integer/number type consistency with Lua 5.3.
* Add optional, alternative CLOCK_MONOTONIC implementation on OS X using
  Mach clock_get_time. Build with -DUSE_CLOCK_GET_TIME. However, extensive
  research suggests that mach_absolute_time isn't susceptible to CPU TSC
  drift in multi-core or multi-package environments. Definitely not on x86
  as AMD and Intel made RDTSC invariant years ago. For ARM I'm awaiting
  confirmation from Apple engineers.
* Add fcntl, including support for POSIX file locks.
* Add flockfile, ftrylock, funlockfile.
* Add gethostname, getppid, lchown, pread, pwrite, read, write.

Homepage: http://25thandclement.com/~william/projects/lunix.html
Documentation: http://25thandclement.com/~william/projects/lunix.pdf

About Lua Unix:

Lua Unix is a bindings library module to common Unix system APIs. The module
is regularly tested with Linux, OS X, FreeBSD, NetBSD, OpenBSD, Solaris, and
AIX. The best way to describe it is in contradistinction to luaposix, the
most popular bindings module for Unix APIs in Lua.

Thread-safety - Unlike luaposix, it strives to be as thread-safe as possible
on the host platform. Interfaces like strerror_r and O_CLOEXEC are used
throughout. The module even includes a novel solution for the inherently
non-thread-safe umask system call, where calling umask from one thread might
result in another thread creating a file with unsafe or unexpected
permissions. APIs which pose thread-safety issues and which could not be
made transparently safe are documented thoroughly in both the PDF and source
code.

Unix Extensions - Unlike luaposix, the library does not restrict itself to
POSIX, and emulates an interface when not available natively on a supported
platform. For example, the library provides arc4random (absent on Linux and
Solaris), clock_gettime (absent on OS X), a thread-safe timegm (absent on
Solaris and AIX), getifaddrs (absent on Solaris 10 and AIX), and
sigtimedwait (absent on OS X and OpenBSD).

Leak-safety - Unlike luaposix, the library prefers dealing with FILE handles
rather than raw integer descriptors to minimize the risk of descriptor
leaks. Raw descriptors are accepted as arguments but new file objects are
generally returned as FILE handles.