-- See LICENSE file for copyright and license details. local l = require "luxio" function handler() return end l.sigaction(l.SIGINT, {["sa_handler"] = handler}) s = l.newsigset() l.sigemptyset(s) l.sigaddset(s, l.SIGINT) print("Press CTRL-C...") sig, errno = l.sigwait(s, l.SIGINT) if sig == l.SIGINT then print("PASS") else print(("FAIL (expected sig to be %d but it is %d)"):format(l.SIGINT, sig)) end