summary refs log tree commit diff
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2006-05-10 20:50:38 +0000
committerGerrit Pape <pape@smarden.org>2006-05-10 20:50:38 +0000
commitb48e23896bf0f693a14855d00ae3d5b4def5181c (patch)
tree5c6431b6e722eaa50027dd67174d7aec9d0c29db
parent3e5c59ae66d83c22ca864ef1bca7d327f9e25239 (diff)
downloadrunit-b48e23896bf0f693a14855d00ae3d5b4def5181c.tar.gz
runit-b48e23896bf0f693a14855d00ae3d5b4def5181c.tar.xz
runit-b48e23896bf0f693a14855d00ae3d5b4def5181c.zip
* runsv.c: delay restart of log service at least 1 sec, just as the main
    service.
  * runsvdir.c: don't double-copy filedescriptor.
-rw-r--r--package/CHANGES6
-rw-r--r--src/runsv.c3
-rw-r--r--src/runsvdir.c3
3 files changed, 9 insertions, 3 deletions
diff --git a/package/CHANGES b/package/CHANGES
index 743750f..757996c 100644
--- a/package/CHANGES
+++ b/package/CHANGES
@@ -1,3 +1,9 @@
+1.5.1
+Wed, 10 May 2006 20:47:34 +0000
+  * runsv.c: delay restart of log service at least 1 sec, just as the main
+    service.
+  * runsvdir.c: don't double-copy filedescriptor.
+
 1.5.0
 Sun, 16 Apr 2006 12:26:50 +0000
   * man/runsvdir.8: document that the services directory is re-scanned if
diff --git a/src/runsv.c b/src/runsv.c
index 342354f..655ce12 100644
--- a/src/runsv.c
+++ b/src/runsv.c
@@ -560,8 +560,11 @@ int main(int argc, char **argv) {
           pidchanged =1;
           svd[1].state =S_DOWN;
           svd[1].ctrl &=~C_TERM;
+          taia_uint(&deadline, 1);
+          taia_add(&deadline, &svd[1].start, &deadline);
           taia_now(&svd[1].start);
           update_status(&svd[1]);
+          if (taia_less(&svd[1].start, &deadline)) sleep(1);
         }
       }
     }
diff --git a/src/runsvdir.c b/src/runsvdir.c
index 897b454..a8eae39 100644
--- a/src/runsvdir.c
+++ b/src/runsvdir.c
@@ -68,9 +68,6 @@ void runsv(int no, char *name) {
     prog[0] ="runsv";
     prog[1] =name;
     prog[2] =0;
-    if (rplog)
-      if (fd_move(2, logpipe[1]) == -1)
-	warn("unable to set filedescriptor for log service", 0);
     sig_uncatch(sig_hangup);
     sig_uncatch(sig_term);
     if (pgrp) setsid();