提交 9ff3470c 编写于 作者: X xlei1030

Fix: 重启前, appspawn停止所有已孵化的app进程

Signed-off-by: Nxlei1030 <xionglei6@huawei.com>
上级 424c315d
......@@ -18,6 +18,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <unistd.h>
#include "cJSON.h"
......@@ -959,6 +960,11 @@ void StopServiceByName(const char *servName)
void StopAllServices(int flags, const char **exclude, int size,
int (*filter)(const Service *service, const char **exclude, int size))
{
Service *service = GetServiceByName("appspawn");
if (service != NULL && service->pid != 0) {
waitpid(service->pid, 0, 0);
}
InitGroupNode *node = GetNextGroupNode(NODE_TYPE_SERVICES, NULL);
while (node != NULL) {
Service *service = node->data.service;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册