supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Laurent Bercot <ska-supervision@skarnet.org>
To: supervision@list.skarnet.org
Subject: Re: post action
Date: Sat, 6 Nov 2010 13:25:16 +0100	[thread overview]
Message-ID: <20101106122516.GA1498@skarnet.org> (raw)
In-Reply-To: <4CD3EC3D.7070008@opensde.org>

> 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


      parent reply	other threads:[~2010-11-06 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-05 11:36 Alejandro Mery
2010-11-05 12:11 ` Charlie Brady
2010-11-05 12:15   ` Charlie Brady
2010-11-05 13:11   ` Alejandro Mery
2010-11-05 13:19     ` Charlie Brady
2010-11-06 12:25 ` Laurent Bercot [this message]

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=20101106122516.GA1498@skarnet.org \
    --to=ska-supervision@skarnet.org \
    --cc=supervision@list.skarnet.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).