summaryrefslogtreecommitdiff
path: root/sysutils/daemontools
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2001-05-10 07:10:24 +0000
committerPeter Pentchev <roam@FreeBSD.org>2001-05-10 07:10:24 +0000
commit5069db76e50815dc49c49823d6e92143ad6d2718 (patch)
treec3a9983c558345c4162455627097ec92f52dd813 /sysutils/daemontools
parentFix plist. (diff)
Almost revert a change made in daemontools-0.70's supervise, where
the one-second sleep between invocations was moved to after the actual invocation. This sleep could be interrupted by a SIGCHLD in the case of a failing service, and the service could be restarted way more than the documented once-per-second. Move the sleep back before the fork(), just don't sleep before the very first fork, so the service starts faster. Silence by: Daniel J. Bernstein (no telling if he'll fix this in later daemontools releases, so I guess we'll have to do it as part of our port..) Approved by: nbm (maintainer)
Notes
Notes: svn path=/head/; revision=42485
Diffstat (limited to 'sysutils/daemontools')
-rw-r--r--sysutils/daemontools/Makefile1
-rw-r--r--sysutils/daemontools/files/patch-supervise.c24
2 files changed, 25 insertions, 0 deletions
diff --git a/sysutils/daemontools/Makefile b/sysutils/daemontools/Makefile
index 25c097105aa2..465aeb9bf851 100644
--- a/sysutils/daemontools/Makefile
+++ b/sysutils/daemontools/Makefile
@@ -7,6 +7,7 @@
PORTNAME= daemontools
PORTVERSION= 0.70
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://cr.yp.to/daemontools/ \
ftp://cr.yp.to/daemontools/
diff --git a/sysutils/daemontools/files/patch-supervise.c b/sysutils/daemontools/files/patch-supervise.c
new file mode 100644
index 000000000000..bb9416d059f2
--- /dev/null
+++ b/sysutils/daemontools/files/patch-supervise.c
@@ -0,0 +1,24 @@
+diff -urN supervise.c supervise.c
+--- supervise.c Mon Mar 6 07:21:09 2000
++++ supervise.c Mon Apr 23 11:15:10 2001
+@@ -90,7 +90,12 @@
+ void trystart(void)
+ {
+ int f;
++ static int firstpassed = 0;
+
++ if (firstpassed)
++ sleep(1);
++ else
++ firstpassed = 1;
+ switch(f = fork()) {
+ case -1:
+ strerr_warn4(WARNING,"unable to fork for ",dir,", sleeping 60 seconds: ",&strerr_sys);
+@@ -105,7 +110,6 @@
+ pid = f;
+ pidchange();
+ announce();
+- sleep(1);
+ }
+
+ void doit(void)