runsvdir: fix "linear wait time" bug
authorDenis Vlasenko <vda.linux@googlemail.com>
Wed, 26 Sep 2007 12:18:07 +0000 (12:18 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Wed, 26 Sep 2007 12:18:07 +0000 (12:18 -0000)
runit/runsvdir.c

index 38da7f8aebac2af044a130d4b8ec3f4ef09490bd..94397bc368c444c2a6358941362ac441c0f17ef7 100644 (file)
@@ -300,10 +300,10 @@ int runsvdir_main(int argc, char **argv)
                                stamplog = now + 900;
                        }
                }
-               deadline = now + (check ? 1 : 5);
 
                pfd[0].revents = 0;
                sig_block(SIGCHLD);
+               deadline = (check ? 1 : 5);
                if (rplog)
                        poll(pfd, 1, deadline*1000);
                else