supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* runsvdir problem + patch
@ 2004-07-23  2:15 Eric Lammerts
  2004-07-23 10:18 ` Gerrit Pape
  2004-07-27 19:30 ` Eric Lammerts
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Lammerts @ 2004-07-23  2:15 UTC (permalink / raw)
  Cc: supervision


Hi,
I found a problem with runsvdir: If you create two subdirectories in 
/service within the same second, runsvdir doesn't always see the 2nd 
one.

For example:
- create /service/foo
- runsvdir sees mtime of /service has changed, runs runsv for foo
- create /service/bar

If these three things happen within the same second, the creation of 
/service/bar doesn't change the mtime of /service, and therefore 
runsvdir won't rescan it.

This patch fixes the problem by forcing a check on the next iteration 
after a service was started.

Eric

--- runit-1.0.3/src/runsvdir.c.orig	2004-07-22 19:36:35.000000000 -0400
+++ runit-1.0.3/src/runsvdir.c	2004-07-22 19:37:19.000000000 -0400
@@ -117,6 +117,7 @@
         sv[i].isgone =0;
         svnum++;
         runsv(i, d->d_name);
+      check =1;
       }
     }
     if (errno) {


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-27 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-23  2:15 runsvdir problem + patch Eric Lammerts
2004-07-23 10:18 ` Gerrit Pape
2004-07-27 19:30 ` Eric Lammerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).