Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!goblin3!goblin.stu.neva.ru!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: python-daemon interaction with multiprocessing (secure-smtpd) Date: Wed, 7 May 2014 17:04:18 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 25 Message-ID: NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1399482258 28972 64.122.56.22 (7 May 2014 17:04:18 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 7 May 2014 17:04:18 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:71039 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 dissappears. This seems to happen when the SMTP client closes the connection without saying goodbye first. The process who's PID was in the pid file before it vanished is still running (as is the pool of worker processes), and they are still accepting connections and working as it should. Has anybody else had any luck with DaemonRunner and pidfiles? 2) When DaemonRunner kills the "lead" process (the parent of the worker pool), the worker pools stays alive and continues to handle accept and handle requests. [I've tried kill -TERM and -QUIT on the lead process by hand with the TERM signal, and got the same results: the worker pool continues to run.] How so you terminate a Python program that's using multiprocessing? -- Grant Edwards grant.b.edwards Yow! Look! A ladder! at Maybe it leads to heaven, gmail.com or a sandwich!