From: Mike Kazantsev <mk.fraggod@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] MailScanner: caught SIGTERM, aborting
Date: Sun, 24 May 2009 15:48:29 +0600 [thread overview]
Message-ID: <20090524154829.285d1f74@coercion> (raw)
In-Reply-To: <4A190EEC.6060405@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2160 bytes --]
On Sun, 24 May 2009 11:10:04 +0200
Jarry <mr.jarry@gmail.com> wrote:
> # /etc/init.d/MailScanner stop
> * Stopping MailScanner...
> * MailScanner: caught SIGTERM, aborting
Looks like there's a line in "stop" section that kills the script
itself. Try looking for a lines like these:
pkill MailScanner
killall MailScanner
start-stop-daemon --stop --name MailScanner
Sure, they might be killing the app as well (if the process has
MailScanner in it's name), but there should be full path or pid-based
line instead, so the initscript will exit cleanly.
> # /etc/init.d/MailScanner start
> * WARNING: MailScanner has already been started
Following command should "wipe" initscript memory:
/etc/init.d/MailScanner zap
...so it'll think MailScanner wasn't even started, but that should be
used as a workaround rather than a solution since it leaves init-system
in different state than it thinks it is.
Direct effect is that it won't execute "stop" action on shutdown since
it won't know the script even started.
> Actually, MailScanner stops, but sendmail which has been
> started by MailScanner init script is still there running:
>
> # ps -e | grep sendmail
> 18676 ? 00:00:00 sendmail
> 18679 ? 00:00:00 sendmail
Could be because of aforementioned script "self-destruction".
If sendmail really started by the same script, not as a dependency,
that is.
> Even whenn I killall sendmail, I still get the above mentioned
> warning, and can not start MailScanner. And that is a problem,
> because MailScanner is restarted every hour (to prevent eating
> all resources). I checked /var/run and /var/lock, there is
> no trace of MailScanner or sendmail running, yet I can not
> re-start Mailscanner. How can I fix this problem?
Try using "start-stop-daemon -m/-p/--exec" to start and stop binaries,
instead of relying on process names (which can be easily changed, btw)
and try to use app-created pidfiles, if the launched app has this
capability, since it should know better which of it's processes should
receive stop signal.
--
Mike Kazantsev // fraggod.net
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-05-24 9:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-24 9:10 [gentoo-user] MailScanner: caught SIGTERM, aborting Jarry
2009-05-24 9:48 ` Mike Kazantsev [this message]
2009-05-24 13:37 ` Jarry
2009-05-24 14:22 ` Mike Kazantsev
2009-05-24 14:36 ` Jarry
2009-05-25 0:17 ` Mike Kazantsev
2009-05-24 22:39 ` Stroller
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=20090524154829.285d1f74@coercion \
--to=mk.fraggod@gmail.com \
--cc=gentoo-user@lists.gentoo.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