Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!newsfeed-00.mathworks.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: python-daemon interaction with multiprocessing (secure-smtpd) Date: Wed, 7 May 2014 17:55:45 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 22 Message-ID: References: NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1399485345 14175 64.122.56.22 (7 May 2014 17:55:45 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 7 May 2014 17:55:45 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:71040 On 2014-05-07, Grant Edwards wrote: > With Python 2.7.5, I'm trying to use the python-daemon 1.6 and its > DaemonRunner helper with the seucre-smtpd 1.1.9 which appears to use > multiprocessing and a process pool under the covers. There seem to be > a couple process issues: > > 1) The pid file created by DaemonRunner disappears. This seems to > happen when the SMTP client closes the connection without saying > goodbye first. Hmm. After some further testing, it looks like it often disappears as soon as the first connection is accepted (which I think is when the first worker process is created). > How do you terminate a Python program that's using multiprocessing? It looks like you have to kill all the threads individually. :/ -- Grant Edwards grant.b.edwards Yow! We are now enjoying at total mutual interaction in gmail.com an imaginary hot tub ...