/usr/share/lua/5.1/cqueues/signal.lua is in lua-cqueues 20161214-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37  | local loader = function(loader, ...)
	local cqueues = require("cqueues")
	local signal = require("_cqueues.signal")
	--
	-- signal:wait
	--
	local wait; wait = signal.interpose("wait", function(self, timeout)
		local deadline = timeout and (cqueues.monotime() + timeout)
		local signo
		local ready = function()
			signo = wait(self)
			return signo
		end
		while not ready() do
			if deadline then
				local curtime = cqueues.monotime()
				if curtime >= deadline then
					return nil
				else
					cqueues.poll(self, deadline - curtime)
				end
			else
				cqueues.poll(self)
			end
		end
		return signo
	end)
	signal.loader = loader
	return signal
end
return loader(loader, ...)
 |