supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Vincent Danen <vdanen@annvix.org>
Subject: Re: supervising postfix
Date: Sat, 16 Oct 2004 19:38:43 -0600	[thread overview]
Message-ID: <47B750CA-1FDD-11D9-8DD8-000A9598BFB2@annvix.org> (raw)
In-Reply-To: <532D0697-1FCC-11D9-8DD8-000A9598BFB2@annvix.org>

[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]


On 16-Oct-04, at 5:37 PM, Vincent Danen wrote:

>>> Patching postfix is not my idea of a good time, either.  I'd prefer 
>>> to
>>> not mangle as much software as possible because it becomes a
>>> maintenance nuisance.
>>
>> Sure, but you already have a maintenance problem, right now. Postfix
>> doesn't run for you.
>
> Well, it does.  Not the way that I exactly want, but I can start 
> postfix from stage 1 and have it work.  Of course, if I do it this way 
> I have to "exec chpst -P postfix start &" which isn't elegant.
>
> I'm recompiling postfix now with the change to master.c you noted in 
> your next email and we'll see if I can make master run under 
> supervision and do the right thing.

Ok, just patched master.c and it works properly supervised now.  For 
the archives, and anyone else looking to run postfix 2.1.5 supervised:

[vdanen@dionysus SPECS]$ bzcat 
../SOURCES/postfix-2.1.5-avx-warnsetsid.patch.bz2
--- postfix-2.1.5/src/master/master.c.avx       2004-10-16 
15:47:25.000000000 -0600
+++ postfix-2.1.5/src/master/master.c   2004-10-16 15:49:27.000000000 
-0600
@@ -286,9 +286,10 @@
       * Run in a separate process group, so that "postfix stop" can 
terminate
       * all MTA processes cleanly. Give up if we can't separate from our
       * parent process. We're not supposed to blow away the parent.
+     * Annvix: to run master supervised, we change this from being 
fatal to being a warning
       */
-    if (setsid() == -1)
-       msg_fatal("unable to set session and process group ID: %m");
+    if (setsid() < 0)
+       msg_warn("setsid failed: %m");

      /*
       * Make some room for plumbing with file descriptors. XXX This 
breaks


Thanks, Charlie!  That seemed to work quite well.

-- 
Annvix - Secure Linux Server: http://annvix.org/
*Please note gpg keyid FE6F2AFD has been replaced with keyid FEE30AD4*
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

  reply	other threads:[~2004-10-17  1:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-16  4:35 Vincent Danen
2004-10-16 19:11 ` Charlie Brady
2004-10-16 19:28   ` Vincent Danen
2004-10-16 20:11     ` Charlie Brady
2004-10-16 23:37       ` Vincent Danen
2004-10-17  1:38         ` Vincent Danen [this message]
2004-10-16 20:42   ` Charlie Brady
2004-11-01 21:45   ` Csillag Tamas

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=47B750CA-1FDD-11D9-8DD8-000A9598BFB2@annvix.org \
    --to=vdanen@annvix.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).