[systemd-commits] 2 commits - src/core src/libsystemd-bus
Lennart Poettering
lennart at kemper.freedesktop.org
Thu Dec 12 11:50:37 PST 2013
src/core/service.c | 11 ++++++++++-
src/libsystemd-bus/bus-message.c | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit e4bb80a07610e6559aa6d2d763fd0b78634a4b12
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Dec 12 20:43:37 2013 +0100
bus: fix rewind logic
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index a86cd9a..8d449c5 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -4152,7 +4152,7 @@ _public_ int sd_bus_message_rewind(sd_bus_message *m, int complete) {
}
c->offset_index = 0;
- c->item_size = c->n_offsets > 0 ? c->offsets[0] : c->end;
+ c->item_size = (c->n_offsets > 0 ? c->offsets[0] : c->end) - c->begin;
return !isempty(c->signature);
}
commit c4ef331782b4c0c615a258d3a4e6c71d8ccc67e1
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Dec 12 20:16:06 2013 +0100
service: process watchdog timeouts with lowest priority
diff --git a/src/core/service.c b/src/core/service.c
index 67d2008..3b3f956 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -263,8 +263,17 @@ static void service_start_watchdog(Service *s) {
}
r = sd_event_source_set_enabled(s->watchdog_event_source, SD_EVENT_ONESHOT);
- } else
+ } else {
r = sd_event_add_monotonic(UNIT(s)->manager->event, s->watchdog_timestamp.monotonic + s->watchdog_usec, 0, service_dispatch_watchdog, s, &s->watchdog_event_source);
+ if (r < 0) {
+ log_warning_unit(UNIT(s)->id, "%s failed to add watchdog timer: %s", UNIT(s)->id, strerror(-r));
+ return;
+ }
+
+ /* Let's process everything else which might be a sign
+ * of living before we consider a service died. */
+ r = sd_event_source_set_priority(s->watchdog_event_source, SD_EVENT_PRIORITY_IDLE);
+ }
if (r < 0)
log_warning_unit(UNIT(s)->id, "%s failed to install watchdog timer: %s", UNIT(s)->id, strerror(-r));
More information about the systemd-commits
mailing list