summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index f932c79a1b..72ce2f2595 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1363,7 +1363,8 @@ static int process_event(Manager *m, struct epoll_event *ev) {
ssize_t k;
/* Some timer event, to be dispatched to the units */
- if ((k = read(w->fd, &v, sizeof(v))) != sizeof(v)) {
+ k = read(w->fd, &v, sizeof(v));
+ if (k != sizeof(v)) {
if (k < 0 && (errno == EINTR || errno == EAGAIN))
break;
@@ -2307,3 +2308,10 @@ bool manager_get_show_status(Manager *m) {
return plymouth_running();
}
+
+void watch_init(Watch *w) {
+ assert(w);
+
+ w->type = WATCH_INVALID;
+ w->fd = -1;
+}