From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2062 Path: news.gmane.org!not-for-mail From: Laurent Bercot Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: post action Date: Sat, 6 Nov 2010 13:25:16 +0100 Message-ID: <20101106122516.GA1498@skarnet.org> References: <4CD3EC3D.7070008@opensde.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1289046201 3030 80.91.229.12 (6 Nov 2010 12:23:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 6 Nov 2010 12:23:21 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2296-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Nov 06 13:23:18 2010 Return-path: Envelope-to: gcsg-supervision@lo.gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1PEhne-0001Ap-3U for gcsg-supervision@lo.gmane.org; Sat, 06 Nov 2010 13:23:14 +0100 Original-Received: (qmail 3161 invoked by uid 76); 6 Nov 2010 12:25:18 -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 3147 invoked by uid 1000); 6 Nov 2010 12:25:16 -0000 Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <4CD3EC3D.7070008@opensde.org> User-Agent: Mutt/1.4i Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2062 Archived-At: > Unfortunately it (re)creates a unix socket with permissions unfit > for the purpose, so I have to chmod g+w /var/run/thin-*/socket every > time. cron gives me a granularity of 1 minute which still makes the > application unreachable for up-to one looooong minute. If you want to avoid patching software or doing ugly things like intercepting syscalls (YMMV, but to me it IS ugly :P), depending on your OS, you could set up an additional service that watches the socket creation and automatically chmods it to the right permissions. Unfortunately, Unix does not offer any portable way to be notified of FS operations, so the code of that additional service would have to be OS-specific. For instance, you'd use "inotify" on Linux and "kevent" on BSD. Or you would have to resort to polling - which is exactly what cron does anyway, except using a specific service would let you have control over the polling granularity. But I am definitely not going to suggest that. (What is the lesser evil between polling and intercepting syscalls? now that's an interesting question of faith. :)) -- Laurent