Gentoo Archives: gentoo-user

From: Mike Kazantsev <mk.fraggod@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] MailScanner: caught SIGTERM, aborting
Date: Sun, 24 May 2009 09:51:48
Message-Id: 20090524154829.285d1f74@coercion
In Reply to: [gentoo-user] MailScanner: caught SIGTERM, aborting by Jarry
1 On Sun, 24 May 2009 11:10:04 +0200
2 Jarry <mr.jarry@×××××.com> wrote:
3
4 > # /etc/init.d/MailScanner stop
5 > * Stopping MailScanner...
6 > * MailScanner: caught SIGTERM, aborting
7
8
9 Looks like there's a line in "stop" section that kills the script
10 itself. Try looking for a lines like these:
11
12 pkill MailScanner
13 killall MailScanner
14 start-stop-daemon --stop --name MailScanner
15
16 Sure, they might be killing the app as well (if the process has
17 MailScanner in it's name), but there should be full path or pid-based
18 line instead, so the initscript will exit cleanly.
19
20
21 > # /etc/init.d/MailScanner start
22 > * WARNING: MailScanner has already been started
23
24
25 Following command should "wipe" initscript memory:
26
27 /etc/init.d/MailScanner zap
28
29 ...so it'll think MailScanner wasn't even started, but that should be
30 used as a workaround rather than a solution since it leaves init-system
31 in different state than it thinks it is.
32 Direct effect is that it won't execute "stop" action on shutdown since
33 it won't know the script even started.
34
35
36 > Actually, MailScanner stops, but sendmail which has been
37 > started by MailScanner init script is still there running:
38 >
39 > # ps -e | grep sendmail
40 > 18676 ? 00:00:00 sendmail
41 > 18679 ? 00:00:00 sendmail
42
43
44 Could be because of aforementioned script "self-destruction".
45 If sendmail really started by the same script, not as a dependency,
46 that is.
47
48
49 > Even whenn I killall sendmail, I still get the above mentioned
50 > warning, and can not start MailScanner. And that is a problem,
51 > because MailScanner is restarted every hour (to prevent eating
52 > all resources). I checked /var/run and /var/lock, there is
53 > no trace of MailScanner or sendmail running, yet I can not
54 > re-start Mailscanner. How can I fix this problem?
55
56
57 Try using "start-stop-daemon -m/-p/--exec" to start and stop binaries,
58 instead of relying on process names (which can be easily changed, btw)
59 and try to use app-created pidfiles, if the launched app has this
60 capability, since it should know better which of it's processes should
61 receive stop signal.
62
63
64 --
65 Mike Kazantsev // fraggod.net

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] MailScanner: caught SIGTERM, aborting Jarry <mr.jarry@×××××.com>