lua-users home
lua-l archive

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

On Mon, Apr 12, 2010 at 2:02 PM, steve donovan
<> wrote:
> The final solution is a little ... bizarre.

Well, this is not the final/perfect solution, but it is simpler:

ensure that signal(2,1) is first called, then this will do the job:

		local res =
		if not res then
			print 'ctrl-c caught'
			return ''

where signal() is declared like this

require 'alien'
local lib = alien.load 'msvcrt.dll'  -- or alien.default for Unix
signal = lib.signal

steve d.