runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 98db8bfc0203f91d367a9e1a413bb51be8c48bda
parent 30081b22bdb264e6b2d6d01063f44304e96dc024
Author: Gerrit Pape <pape@smarden.org>
Date:   Wed, 10 May 2006 20:50:38 +0000

  * runsv.c: delay restart of log service at least 1 sec, just as the main
    service.
  * runsvdir.c: don't double-copy filedescriptor.

Diffstat:
Mpackage/CHANGES | 6++++++
Msrc/runsv.c | 3+++
Msrc/runsvdir.c | 3---
3 files changed, 9 insertions(+), 3 deletions(-)

diff --git 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 @@ -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 @@ -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();