lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I wonder if signal handling (as in luaposix) is supposed to work in any situation. Or are there limitations, preconditions etc.(on Linux)?

I'm asking because I have a program where signal() simply doesn't work. After putting

	local P = require "posix"
	P.signal(P.SIGUSR1, function() print("signal") end)

at the beginning of the program, I expect the command "kill -s USR1 $pid" to print "signal", but instead the program exits immediately. This even happens when the signal handling function is completely empty.

The program in question is pretty complex. However, in simple test programs signal() works as expected.

Any ideas what could prevent signal() from working correctly?

Greetings,
Bernd