diff options
author | Roy Marples <roy@marples.name> | 2008-09-27 17:17:15 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-09-27 17:17:15 +0000 |
commit | 4291b9140e2d5a63ee8d41ca612fd81a8cbe3dd8 (patch) | |
tree | a8a7611f62960d1896667f32ea525ac98b5ba901 | |
parent | 28d7fb9430401d1d2947cd75672f03562582bb08 (diff) |
Warn when waiting for a service every few seconds.
-rw-r--r-- | src/rc/runscript.c | 6 |
1 files changed, 6 insertions, 0 deletions
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)) |