diff options
| author | ruki <[email protected]> | 2020-03-23 21:00:47 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-23 00:04:45 +0800 |
| commit | 32d75762f2fe48cf413132d935d0834d7e3d5e6e (patch) | |
| tree | fcb42ea974c913c162c609877d4832707a2c65c0 /core/src | |
| parent | 5b1a9e54c3d97e08df6402baf22f528cf47ef1ae (diff) | |
update process
Diffstat (limited to 'core/src')
| -rw-r--r-- | core/src/xmake/process/open.c | 7 | ||||
| -rw-r--r-- | core/src/xmake/process/openv.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/core/src/xmake/process/open.c b/core/src/xmake/process/open.c index 5ab60957a..365876047 100644 --- a/core/src/xmake/process/open.c +++ b/core/src/xmake/process/open.c @@ -62,6 +62,13 @@ tb_int_t xm_process_open(lua_State* lua) tb_pipe_file_ref_t errpipe = tb_null; if (lua_istable(lua, 2)) { + // is detached? + lua_pushstring(lua, "detach"); + lua_gettable(lua, 2); + if (lua_toboolean(lua, -1)) + attr.flags |= TB_PROCESS_FLAG_DETACH; + lua_pop(lua, 1); + // get outpath lua_pushstring(lua, "outpath"); lua_gettable(lua, 2); diff --git a/core/src/xmake/process/openv.c b/core/src/xmake/process/openv.c index 69557aa69..2eeb35491 100644 --- a/core/src/xmake/process/openv.c +++ b/core/src/xmake/process/openv.c @@ -104,6 +104,13 @@ tb_int_t xm_process_openv(lua_State* lua) tb_pipe_file_ref_t errpipe = tb_null; if (lua_istable(lua, 3)) { + // is detached? + lua_pushstring(lua, "detach"); + lua_gettable(lua, 2); + if (lua_toboolean(lua, -1)) + attr.flags |= TB_PROCESS_FLAG_DETACH; + lua_pop(lua, 1); + // get outpath lua_pushstring(lua, "outpath"); lua_gettable(lua, 3); |
