aboutsummaryrefslogtreecommitdiff
path: root/drivers/unix/os_unix.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2014-12-16 22:31:57 -0300
committerJuan Linietsky2014-12-16 22:31:57 -0300
commitbcf27feb980aec593c7cb771984e46113cfad757 (patch)
treedabc98af627732ccf5d1bbfa8aa58348030f6324 /drivers/unix/os_unix.cpp
parentbe4e40e90a5a322f6a7cec4893854ef5b15db600 (diff)
downloadgodot-bcf27feb980aec593c7cb771984e46113cfad757.tar.gz
godot-bcf27feb980aec593c7cb771984e46113cfad757.tar.zst
godot-bcf27feb980aec593c7cb771984e46113cfad757.zip
Diffstat (limited to 'drivers/unix/os_unix.cpp')
-rw-r--r--drivers/unix/os_unix.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index e6458068e..2de975e5d 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -332,6 +332,12 @@ Error OS_Unix::execute(const String& p_path, const List<String>& p_arguments,boo
Error OS_Unix::kill(const ProcessID& p_pid) {
int ret = ::kill(p_pid,SIGKILL);
+ if (!ret) {
+ //avoid zombie process
+ int st;
+ ::waitpid(p_pid,&st,0);
+
+ }
return ret?ERR_INVALID_PARAMETER:OK;
}