Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/luajit.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,16 @@ static void dotty(lua_State *L)
if (status == 0 && lua_gettop(L) > 0) { /* any result to print? */
lua_getglobal(L, "print");
lua_insert(L, 1);
#if !LJ_TARGET_CONSOLE
signal(SIGINT, laction);
#endif
if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0)
l_message(progname,
lua_pushfstring(L, "error calling " LUA_QL("print") " (%s)",
lua_tostring(L, -1)));
#if !LJ_TARGET_CONSOLE
signal(SIGINT, SIG_DFL);
#endif
}
}
lua_settop(L, 0); /* clear stack */
Expand Down