diff --git a/src/api/process.c b/src/api/process.c index f43a316f..772bd1fe 100644 --- a/src/api/process.c +++ b/src/api/process.c @@ -150,7 +150,7 @@ static int process_strerror(lua_State* L) lua_pushstring(L, reproc_strerror(error_code)); else lua_pushnil(L); - + return 1; } @@ -368,5 +368,11 @@ int luaopen_process(lua_State *L) L_SETNUM(L, -1, "REDIRECT_DISCARD", REPROC_REDIRECT_DISCARD); L_SETNUM(L, -1, "REDIRECT_STDOUT", REPROC_REDIRECT_STDOUT); + lua_pushnumber(L, REPROC_INFINITE); + lua_setfield(L, -2, "WAIT_INFINITE"); + + lua_pushnumber(L, REPROC_DEADLINE); + lua_setfield(L, -2, "WAIT_DEADLINE"); + return 1; } diff --git a/src/main.c b/src/main.c index 46befe51..3aacf828 100644 --- a/src/main.c +++ b/src/main.c @@ -172,8 +172,8 @@ init_lua: "local core\n" "xpcall(function()\n" " HOME = os.getenv('" LITE_OS_HOME "')\n" - " local exedir = EXEFILE:match(\"^(.*)" LITE_PATHSEP_PATTERN LITE_NONPATHSEP_PATTERN "$\")\n" - " local prefix = exedir:match(\"^(.*)" LITE_PATHSEP_PATTERN "bin$\")\n" + " local exedir = EXEFILE:match('^(.*)" LITE_PATHSEP_PATTERN LITE_NONPATHSEP_PATTERN "$')\n" + " local prefix = exedir:match('^(.*)" LITE_PATHSEP_PATTERN "bin$')\n" " dofile((MACOS_RESOURCES or (prefix and prefix .. '/share/lite-xl' or exedir .. '/data')) .. '/core/start.lua')\n" " core = require('core')\n" " core.init()\n"