On 11/21/2019 8:17 AM, Henri Menke wrote:
Dear list,
The following Lua script behaves differently when executed in Lua vs.
LuaTeX.
print(os.execute("date"))
It seems that the definition of os_execute in loslibext.c was copied
over from Lua 5.1 and not adapted to newer versions.
$ lu
Below I include a suggestion on how to do this sort of version agnostic.
Cheers, Henri
Live example on Wandbox:
https://wandbox.org/permlink/jEn9kNnPB0t5rwjP
---
#include
#include
#include
#include
#include
static int (*lua_os_execute)(lua_State *L) = NULL;
static int os_execute(l
Dear list,
The following Lua script behaves differently when executed in Lua vs.
LuaTeX.
print(os.execute("date"))
It seems that the definition of os_execute in loslibext.c was copied
over from Lua 5.1 and not adapted to newer versions.
$ lua5.1 test.lua
0
$ lua5.2 test.lua