Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (15 sloc) 397 Bytes
require "evc"
local loop = evc.default_loop()
print("loop: ", loop)
local SIGHUP = 1
local sig = evc.signal_init(SIGHUP)
print("signal watcher: ", sig)
sig:set_cb(function(w, ev)
print("Got HUP")
sig:stop(loop)
end)
sig:start(loop)
print("signal number is ", sig:signum())
print "starting loop...(send this process a signal)"
loop:loop()
print "done"