signal.lua

#!/usr/bin/env eco

local time = require 'eco.time'
local sys = require 'eco.sys'

local sig = sys.signal(sys.SIGINT, function()
    print('\nGot SIGINT, now quit')
end)

time.at(3, function()
    sig:close()
    print('Signal monitoring has been cancelled')
end)
generated by LDoc 1.5.0 Last updated 2026-04-09 14:48:22