process: call poll_process when getting returncode
This commit is contained in:
+1
-1
@@ -697,7 +697,7 @@ static int f_pid(lua_State* L) {
|
||||
|
||||
static int f_returncode(lua_State *L) {
|
||||
process_t* self = (process_t*) luaL_checkudata(L, 1, API_TYPE_PROCESS);
|
||||
if (self->running)
|
||||
if (poll_process(self, WAIT_NONE))
|
||||
return 0;
|
||||
lua_pushinteger(L, self->returncode);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user