From 41c67c1b145462dd86ce4b169c4b8f4396177fb6 Mon Sep 17 00:00:00 2001 From: xionglei6 Date: Tue, 15 Feb 2022 15:13:42 +0800 Subject: [PATCH] fix: ueventd start ondemand Signed-off-by: xionglei6 --- services/init/init_service_socket.c | 1 + services/init/standard/init.c | 1 + 2 files changed, 2 insertions(+) diff --git a/services/init/init_service_socket.c b/services/init/init_service_socket.c index f001f91c..a7b70ba1 100755 --- a/services/init/init_service_socket.c +++ b/services/init/init_service_socket.c @@ -202,6 +202,7 @@ void SocketDelWatcher(ServiceWatcher watcherHandle) int CreateServiceSocket(Service *service) { INIT_CHECK(service != NULL && service->socketCfg != NULL, return 0); + INIT_CHECK(service->socketCfg->sockFd == -1, return 0); int ret = 0; ServiceSocket *tmpSock = service->socketCfg; while (tmpSock != NULL) { diff --git a/services/init/standard/init.c b/services/init/standard/init.c index 750f3542..f4acf26b 100755 --- a/services/init/standard/init.c +++ b/services/init/standard/init.c @@ -158,6 +158,7 @@ static int StartUeventd(char **requiredDevices, int num) return -1; } RetriggerUevent(ueventSockFd, requiredDevices, num); + close(ueventSockFd); return 0; } -- GitLab