lua-users home
lua-l archive

Re: os.execute() returning -1

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Am I missing something here? Any ideas where to look for? Maybe some limit?
Try this replacement in loslib.c and see what the error message is:
static int os_execute (lua_State *L) {
 int rc=system(luaL_optstring(L, 1, NULL));
 int en=errno;
 lua_pushinteger(L, rc);
 lua_pushstring(L, strerror(en));
 lua_pushinteger(L, en);
 return 3;
}

AltStyle によって変換されたページ (->オリジナル) /