[LEDE-DEV] The procd daemon does not handle correctly the instances
Lebleu Pierre
Pierre.Lebleu at technicolor.com
Tue Sep 27 08:34:54 PDT 2016
Hi all,
I found a bug in the daemon process management. Indeed, when we have several instances of one daemon such as "dnsmasq" and we want to restart only one instance, the other instance is killed by procd. It seems procd updates the second instance and then, kill it.
Please find the patch :
diff --git a/service/service.c b/service/service.c
index 0796adb..9ed07da 100644
--- a/service/service.c
+++ b/service/service.c
@@ -132,8 +132,6 @@ service_update(struct service *s, struct blob_attr **tb, bool add)
}
if (tb[SERVICE_SET_INSTANCES]) {
- if (!add)
- vlist_update(&s->instances);
blobmsg_for_each_attr(cur, tb[SERVICE_SET_INSTANCES], rem) {
service_instance_add(s, cur);
}
@@ -238,7 +236,7 @@ service_handle_set(struct ubus_context *ctx, struct ubus_object *obj,
int ret;
blobmsg_parse(service_set_attrs, __SERVICE_SET_MAX, tb, blob_data(msg), blob_len(msg));
- cur = tb[SERVICE_ATTR_NAME];
+ cur = tb[SERVICE_SET_NAME];
if (!cur)
return UBUS_STATUS_INVALID_ARGUMENT;
Regards,
Pierre
More information about the Lede-dev
mailing list