lua-lluv
lua-lluv copied to clipboard
bad argument #1 to 'start' (number expected, got nil)
I am literally copy-pasting the signals example, and running it produces
lua: ./toy.lua:7: bad argument #1 to 'start' (number expected, got nil)
stack traceback:
[C]: in method 'start'
./toy.lua:7: in main chunk
[C]: in ?
This is on Lua 5.3.3, Linux x86_64.
Aha! I checked that this was because on this system lluv does not see SIGBREAK. In a Lua repl:
Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio
> require("luarocks.loader")
table: 0x55bb66bcfc20
> uv=require "lluv"
> uv
table: 0x55bb66c2c7a0
> uv.SIGINT
2
> uv.SIGBREAK
nil
> uv.SIGHUP
1
> uv.SIGWINCH
28
All those constnat is a compile time. So it depeends on header files only