Re: [evolution-patches] [mailer] when starting spamd, use unix domain socket instead of opening tcp port #53109

On Mon, 2004-10-18 at 19:09 +0200, Radek Doulík wrote:
On Thu, 2004-10-14 at 08:43 +0800, Not Zed wrote:
On Wed, 2004-10-13 at 14:04 +0200, Radek Doulík wrote:
On Wed, 2004-10-13 at 09:14 +0800, Not Zed wrote:

Is there any reason you don't just start it if it isn't started already?
this is what I do. I start it only if there's no system spamd running. we may additionally save socket path to e_mktemp generated file and look for running there, but that sounds overly complicated to me.
Hmm, ok i misread the init code.
  I'm not sure i like the additions of the init stuff, and running it all the time.  What happens if it dies at some point?
when it dies then it will not detect any more junk. testing if spamd runs for each junk test is expensive.
But you can surely detect if its died at some point?
yeah, I can tell that from spamc return code. I can try to relaunch spamd again, but I will have to be careful in case it will crashes continuously. not sure if it's worth it. I have never seen spamd crash so far.

what do you mean by "running it all the time", running what?
Well the only thing you're running at all is spamd, so i couldn't have meant anything else!
I think the init callback is useful and might be even more if we implement more plugins. btw, is it going to be possible to use EPlugin for junk plugins?
Hmm, I guess.  EPlugin would be possible but it would need a junk plugin mechanism.

But the mail session init/quit stuff shouldn't be added.  Mail session is an object and already has an init and a finalise method.  Use those.
I didn't see finalise function before, I can use that, sure. The init function was here before, so I am not introducing it.

Also what happens if quit isn't called, does it keep running?  (e.g. if evo crashes or bad shutdown path).
yeah, it keeps running. there will be still pid file around, so we may kill it in --force-shutdown as we do with e-d-s.
Hmm, thats not very good.  Is it being run async?  Shouldn't it die with the parent if evolution starts it?

This has to be fixed somehow since there's no guarantee evolution will close properly.
So far we start it as daemon. I guess we can modify it to run as evo subprocess, but it's out of scope of that patch. I can cook another patch for that. I have to find out if evo already handles SIGCHLD signal too.

So to summarize it,

I think its worth it.  It's easy to just count the restarts and give up if you get them too often.

Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]