From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/526 Path: main.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runsvdir problem + patch Date: Fri, 23 Jul 2004 10:18:07 +0000 Message-ID: <20040723101811.28082.qmail@5b5e5d4e15a472.315fe32.mid.smarden.org> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1090577879 18355 80.91.224.253 (23 Jul 2004 10:17:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Jul 2004 10:17:59 +0000 (UTC) Original-X-From: supervision-return-764-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Jul 23 12:17:54 2004 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1Bnx7i-0003Bs-00 for ; Fri, 23 Jul 2004 12:17:54 +0200 Original-Received: (qmail 20577 invoked by uid 76); 23 Jul 2004 10:18:14 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 20572 invoked from network); 23 Jul 2004 10:18:14 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: Xref: main.gmane.org gmane.comp.sysutils.supervision.general:526 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:526 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) {