#361736 lua5.1: Quitting a Lua process blocked on I/O requires two ^C's

Package:
lua5.1
Source:
lua5.1
Description:
Simple, extensible, embeddable programming language
Submitter:
Reuben Thomas
Date:
2010-09-16 11:45:07 UTC
Severity:
normal
#361736#5
Date:
2006-04-09 22:56:33 UTC
From:
To:
Running a Lua script which blocks on I/O from stdin, it takes two
Ctrl-C's to quit it. I think this is an old problem, and requires
Linux-specific code (using sigsetaction) to solve, which is present in
the 5.0 packages.

#361736#10
Date:
2006-04-10 02:14:06 UTC
From:
To:
Reuben Thomas wrote:

I need more info on this (mailing list links, etc.).  Unfortunately the
5.0 Debian package is not well organized and doesn't isolate that patch.

#361736#15
Date:
2007-07-03 17:34:32 UTC
From:
To:
Hello.
Info about a bug and method, which was applied in Debian lua5.0.

http://thread.gmane.org/gmane.comp.lang.lua.general/7543/focus=7552
http://thread.gmane.org/gmane.comp.lang.lua.general/7538/focus=7541

I think more simple way is to compile lua5.1 (executable only) with -ansi flag.
Just add

lua.o: lua.c
        $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -ansi $<

in debian/patches/debian_make.dpatch

#361736#20
Date:
2009-08-20 13:42:07 UTC
From:
To:
I attach a simple patch against 5.1.4 to implement this feature.
#361736#25
Date:
2010-09-16 11:41:29 UTC
From:
To:
Is there some problem with applying my patch?