未验证 提交 e1dd9368 编写于 作者: O openharmony_ci 提交者: Gitee

!342 Fix: appspawn应用孵化能力增强

Merge pull request !342 from 熊磊/init0225
......@@ -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.
先完成此消息的编辑!
想要评论请 注册