提交 8fc44d3d 编写于 作者: M Mupceet

fix fd holder bug

Signed-off-by: NMupceet <laiguizhong@huawei.com>
上级 b3c34b90
......@@ -215,14 +215,16 @@ static void HandlerFdHolder(int sock)
if (strcmp(action, ACTION_HOLD) == 0) {
INIT_LOGI("Service \' %s \' request init to %s fds", serviceName, action);
if (HandlerHoldFds(service, fds, fdCount, pollStr) < 0) {
CloseFds(fds, fdCount);
}
} else if (strcmp(action, ACTION_GET) == 0) {
// In this case, ignore fds, just close them if fd passed to init
CloseFds(fds, fdCount);
HandlerGetFds(sock, service);
} else {
INIT_LOGE("Unexpected action: %s", action);
CloseFds(fds, fdCount);
}
CloseFds(fds, fdCount);
FreeFds(fds);
FreeStringVector(msg, msgCount);
}
......
......@@ -11,7 +11,7 @@
"name" : "fd_holder_test",
"path" : ["/system/bin/fd_holder_test", "save", "fd_holder_test", "/data/test/1", "/data/test/2"],
"uid" : "root",
"gid" : "system",
"gid" : "system"
}
]
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册