nixio: chdir()
This commit is contained in:
parent
82858a8e8f
commit
9bf88087f4
1 changed files with 5 additions and 0 deletions
|
@ -174,6 +174,10 @@ static int nixio_setsid(lua_State *L) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int nixio_chdir(lua_State *L) {
|
||||||
|
return nixio__pstatus(L, !chdir(luaL_checkstring(L, 1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* module table */
|
/* module table */
|
||||||
static const luaL_reg R[] = {
|
static const luaL_reg R[] = {
|
||||||
|
@ -181,6 +185,7 @@ static const luaL_reg R[] = {
|
||||||
{"wait", nixio_wait},
|
{"wait", nixio_wait},
|
||||||
{"kill", nixio_kill},
|
{"kill", nixio_kill},
|
||||||
{"nice", nixio_nice},
|
{"nice", nixio_nice},
|
||||||
|
{"chdir", nixio_chdir},
|
||||||
{"getpid", nixio_getpid},
|
{"getpid", nixio_getpid},
|
||||||
{"getppid", nixio_getppid},
|
{"getppid", nixio_getppid},
|
||||||
{"getuid", nixio_getuid},
|
{"getuid", nixio_getuid},
|
||||||
|
|
Loading…
Reference in a new issue