From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/525 Path: main.gmane.org!not-for-mail From: Eric Lammerts Newsgroups: gmane.comp.sysutils.supervision.general Subject: runsvdir problem + patch Date: Thu, 22 Jul 2004 22:15:48 -0400 (EDT) Organization: Eric Conspiracy Secret Labs Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: sea.gmane.org 1090549061 28032 80.91.224.253 (23 Jul 2004 02:17:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Jul 2004 02:17:41 +0000 (UTC) Cc: supervision@list.skarnet.org Original-X-From: supervision-return-763-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Jul 23 04:17:33 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 1Bnpcr-0000Xx-00 for ; Fri, 23 Jul 2004 04:17:33 +0200 Original-Received: (qmail 19117 invoked by uid 76); 23 Jul 2004 02:17:52 -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 19101 invoked from network); 23 Jul 2004 02:16:11 -0000 Original-To: pape@smarden.org X-Eric-Conspiracy: There is no conspiracy Xref: main.gmane.org gmane.comp.sysutils.supervision.general:525 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:525 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) {