From 2cc6423c61155cca30eb9779927e90ad6285bce1 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 12 Feb 2019 18:18:02 +0100 Subject: [PATCH] path: run in single mode if possible to reduce syscall overhead --- lib/path.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/path.c b/lib/path.c index e3e4c0829..bc9459a86 100644 --- a/lib/path.c +++ b/lib/path.c @@ -662,14 +662,8 @@ int path_parse(struct path *p, json_t *cfg, struct vlist *nodes) p->poll = 1; else if (vlist_length(&p->sources) > 1) p->poll = 1; - else { - struct path_source *ps = (struct path_source *) vlist_at(&p->sources, 0); - - int fds[16]; - int num_fds = node_poll_fds(ps->node, fds); - - p->poll = num_fds > 0; - } + else + p->poll = 0; } ret = vlist_destroy(&sources, NULL, false);