From 4291b9140e2d5a63ee8d41ca612fd81a8cbe3dd8 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 27 Sep 2008 17:17:15 +0000 Subject: Warn when waiting for a service every few seconds. --- src/rc/runscript.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rc/runscript.c b/src/rc/runscript.c index 1d7c0449..896592e9 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -503,6 +503,7 @@ static bool svc_wait(const char *svc) char fifo[PATH_MAX]; struct timespec ts; int nloops = WAIT_MAX * (ONE_SECOND / WAIT_INTERVAL); + int sloops = (ONE_SECOND / WAIT_INTERVAL) * 5; bool retval = false; bool forever = false; RC_STRINGLIST *keywords; @@ -530,6 +531,11 @@ static bool svc_wait(const char *svc) if (! forever) nloops --; + + if (--sloops == 0) { + ewarn("%s: waiting for %s", applet, svc); + sloops = (ONE_SECOND / WAIT_INTERVAL) * 5; + } } if (! exists(fifo)) -- cgit v1.2.3