diff options
| author | ruki <[email protected]> | 2020-06-17 00:38:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-16 21:53:57 +0800 |
| commit | 5e805a59c6c7e1e32292b78853002c9766ac491b (patch) | |
| tree | ec8af123f1c1b315595268a1d7fc2dc9b3c3e654 /core/src/xmake/process/open.c | |
| parent | 973f85fd0f602b868a90725408507bd99ceb210a (diff) | |
support chdir for process
Diffstat (limited to 'core/src/xmake/process/open.c')
| -rw-r--r-- | core/src/xmake/process/open.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/xmake/process/open.c b/core/src/xmake/process/open.c index 365876047..d027887b7 100644 --- a/core/src/xmake/process/open.c +++ b/core/src/xmake/process/open.c @@ -69,6 +69,12 @@ tb_int_t xm_process_open(lua_State* lua) attr.flags |= TB_PROCESS_FLAG_DETACH; lua_pop(lua, 1); + // get curdir + lua_pushstring(lua, "curdir"); + lua_gettable(lua, 3); + attr.curdir = lua_tostring(lua, -1); + lua_pop(lua, 1); + // get outpath lua_pushstring(lua, "outpath"); lua_gettable(lua, 2); |
