diff options
author | Steven Barth <steven@midlink.org> | 2009-03-12 21:44:11 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-03-12 21:44:11 +0000 |
commit | 9bf88087f46b3f15769a9714b9c2ee396f0aed21 (patch) | |
tree | b1414f6ef24057e289da0920e715f7f9c8a410b6 /libs/nixio/src | |
parent | 82858a8e8f15943e8e670a4657f5dc711e9ea851 (diff) |
nixio: chdir()
Diffstat (limited to 'libs/nixio/src')
-rw-r--r-- | libs/nixio/src/process.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/nixio/src/process.c b/libs/nixio/src/process.c index 65d6209008..a82e5660d0 100644 --- a/libs/nixio/src/process.c +++ b/libs/nixio/src/process.c @@ -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 */ static const luaL_reg R[] = { @@ -181,6 +185,7 @@ static const luaL_reg R[] = { {"wait", nixio_wait}, {"kill", nixio_kill}, {"nice", nixio_nice}, + {"chdir", nixio_chdir}, {"getpid", nixio_getpid}, {"getppid", nixio_getppid}, {"getuid", nixio_getuid}, |