提交 dae2cb4a authored 作者: Brian West's avatar Brian West

Fix X-PREPROCESS exec to wait pid

上级 135bac5b
......@@ -56,6 +56,7 @@
#include <switch.h>
#ifndef WIN32
#include <sys/wait.h>
#include <switch_private.h>
#include <glob.h>
#else /* we're on windoze :( */
......@@ -1245,6 +1246,7 @@ static int preprocess_exec(const char *cwd, const char *command, int write_fd, i
}
}
close(fds[0]);
waitpid(pid, NULL, 0);
} else { /* child */
close(fds[0]);
dup2(fds[1], STDOUT_FILENO);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论