mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-05 16:12:32 +00:00
Fixes for diffrent lua versions
This commit is contained in:
parent
46188f9f60
commit
d6c49b6858
10
lsyncd.c
10
lsyncd.c
@ -488,8 +488,8 @@ static void safeexit (lua_State *L, int exitcode) {
|
||||
lua_remove( L, -2 );
|
||||
lua_pushinteger(L, exitcode);
|
||||
lua_call(L, 2, 1);
|
||||
if (lua_isinteger(L, -1)) {
|
||||
exitcode = luaL_checkinteger(L, -1);
|
||||
if (lua_isnumber(L, -1)) {
|
||||
exitcode = luaL_checkint(L, -1);
|
||||
}
|
||||
exit(exitcode);
|
||||
}
|
||||
@ -1131,8 +1131,8 @@ l_now(lua_State *L)
|
||||
static int
|
||||
l_kill( lua_State *L )
|
||||
{
|
||||
pid_t pid = luaL_checkinteger( L, 1 );
|
||||
int sig = luaL_checkinteger( L, 2 );
|
||||
pid_t pid = luaL_checkint( L, 1 );
|
||||
int sig = luaL_checkint( L, 2 );
|
||||
|
||||
int rv = kill(pid, sig );
|
||||
|
||||
@ -1692,7 +1692,7 @@ l_readdir( lua_State *L )
|
||||
int
|
||||
l_terminate( lua_State *L )
|
||||
{
|
||||
int exitcode = luaL_checkinteger( L, 1 );
|
||||
int exitcode = luaL_checkint( L, 1 );
|
||||
|
||||
exit( exitcode );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user