From d3590016e943137a06e42bb0b4d32d6360b4a3af Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 15 May 2012 08:55:19 +0200 Subject: [PATCH] starter: Initialize thread pool so kernel events are consumed. --- src/starter/starter.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/starter/starter.c b/src/starter/starter.c index 15c50c44b..abc3dd7c7 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -46,6 +46,11 @@ #include "cmp.h" #include "interfaces.h" +/** + * Number of threads in the thread pool, if not specified in config. + */ +#define DEFAULT_THREADS 4 + /** * Return codes defined by Linux Standard Base Core Specification 3.1 * in section 20.2. Init Script Actions @@ -475,6 +480,10 @@ int main (int argc, char **argv) { exit(LSB_RC_FAILURE); } + /* we need threads to read events from the kernel */ + lib->processor->set_threads(lib->processor, + lib->settings->get_int(lib->settings, "starter.threads", + DEFAULT_THREADS)); for (;;) {