supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Gerrit Pape <pape@smarden.org>
Subject: Re: runsvdir problem + patch
Date: Fri, 23 Jul 2004 10:18:07 +0000	[thread overview]
Message-ID: <20040723101811.28082.qmail@5b5e5d4e15a472.315fe32.mid.smarden.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0407222211180.11466@ally.lammerts.org>

On Thu, Jul 22, 2004 at 10:15:48PM -0400, Eric Lammerts wrote:
> 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.

Yes, I know about this for some time, but actually was hit by the
problem just once, on a system where the service directory was located
on a ramdisk, and the subdirectories were created in background after
stage 1 finished.

Did you actually run into this problem, or found it by reading the
source?

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

The patch looks fine to me at the first glance, thanks for posting it.

Regards, Gerrit.

> --- 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) {


  reply	other threads:[~2004-07-23 10:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23  2:15 Eric Lammerts
2004-07-23 10:18 ` Gerrit Pape [this message]
2004-07-27 19:30 ` Eric Lammerts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040723101811.28082.qmail@5b5e5d4e15a472.315fe32.mid.smarden.org \
    --to=pape@smarden.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).