[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Break out of program in interpreter
- From: Jose Torre-Bueno <jtorrebueno@...>
- Date: Tue, 14 May 2013 06:31:31 -0700
Yes that does work. However
while true do os.execute('echo hello world') end
cannot be stopped with ^C. The only way to end it is to kill the whole terminal session.
Is there something about calling os.execute that prevents it from seeing ^C? Perhaps the ^C is being caught by the new shell that os.execute starts?
On May 14, 2013, at 5:02 AM, Luiz Henrique de Figueiredo <email@example.com> wrote:
>> I thought that control-C would end a function running in the interpreter and return me to the interpreter's command line
> It does:
> % lua
> Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio
>> while true do end
> stack traceback:
> stdin:1: in main chunk
> [C]: in ?
> Just don't press it twice in a row.