summaryrefslogtreecommitdiff
path: root/core/src/xmake/process/wait.c
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-10 06:35:04 +0800
committerGitHub <[email protected]>2025-11-10 06:35:04 +0800
commit2b01e46fcf619aaecb8435b0fac975e3aff0587f (patch)
tree8f005a8dfc3272e9f027560e5e1b5881a7a8bc70 /core/src/xmake/process/wait.c
parenta1b0ec856e2c22aac84022feb05b6687912e3d6e (diff)
parent2c387895657ae13cd717d7f42f5baed5eb028a8e (diff)
Merge pull request #7008 from xmake-io/format
format code
Diffstat (limited to 'core/src/xmake/process/wait.c')
-rw-r--r--core/src/xmake/process/wait.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/core/src/xmake/process/wait.c b/core/src/xmake/process/wait.c
index 055ae4fab..84d3b7079 100644
--- a/core/src/xmake/process/wait.c
+++ b/core/src/xmake/process/wait.c
@@ -22,8 +22,8 @@
/* //////////////////////////////////////////////////////////////////////////////////////
* trace
*/
-#define TB_TRACE_MODULE_NAME "process.wait"
-#define TB_TRACE_MODULE_DEBUG (0)
+#define TB_TRACE_MODULE_NAME "process.wait"
+#define TB_TRACE_MODULE_DEBUG (0)
/* //////////////////////////////////////////////////////////////////////////////////////
* includes
@@ -35,14 +35,11 @@
*/
// ok, status = process.wait(proc, timeout)
-tb_int_t xm_process_wait(lua_State* lua)
-{
- // check
+tb_int_t xm_process_wait(lua_State *lua) {
tb_assert_and_check_return_val(lua, 0);
// is pointer?
- if (!xm_lua_ispointer(lua, 1))
- {
+ if (!xm_lua_ispointer(lua, 1)) {
// error
lua_pushfstring(lua, "invalid argument type(%s) for process.wait", luaL_typename(lua, 1));
lua_error(lua);
@@ -58,12 +55,11 @@ tb_int_t xm_process_wait(lua_State* lua)
// wait it
tb_long_t status = 0;
- tb_long_t ok = tb_process_wait(process, &status, timeout);
+ tb_long_t ok = tb_process_wait(process, &status, timeout);
// save result
lua_pushinteger(lua, ok);
lua_pushinteger(lua, status);
- // ok
return 2;
}