equal
deleted
inserted
replaced
69 |
69 |
70 // exit the process |
70 // exit the process |
71 nexus_shutdown(lc->lua->nexus); |
71 nexus_shutdown(lc->lua->nexus); |
72 } |
72 } |
73 |
73 |
|
74 static void lua_console_on_interrupt (void *arg) |
|
75 { |
|
76 struct lua_console *lc = arg; |
|
77 |
|
78 // abort thread so we can _start again |
|
79 lua_thread_abort(&lc->thread); |
|
80 |
|
81 // inform user |
|
82 console_print(lc->console, "Execution aborted."); |
|
83 |
|
84 // accept input |
|
85 console_continue(lc->console); |
|
86 } |
|
87 |
74 static struct console_callbacks _console_callbacks = { |
88 static struct console_callbacks _console_callbacks = { |
75 .on_line = lua_console_on_line, |
89 .on_line = lua_console_on_line, |
76 .on_eof = lua_console_on_eof, |
90 .on_eof = lua_console_on_eof, |
|
91 .on_interrupt = lua_console_on_interrupt, |
77 }; |
92 }; |
78 |
93 |
79 err_t lua_console_create (struct lua_console **lc_ptr, struct console *console, struct nexus_lua *lua, struct error_info *err) |
94 err_t lua_console_create (struct lua_console **lc_ptr, struct console *console, struct nexus_lua *lua, struct error_info *err) |
80 { |
95 { |
81 struct lua_console *lc; |
96 struct lua_console *lc; |