python-daemon interaction with multiprocessing (secure-smtpd)

Grant Edwards invalid at invalid.invalid
Wed May 7 13:55:45 EDT 2014


On 2014-05-07, Grant Edwards <invalid at invalid.invalid> 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 ...



More information about the Python-list mailing list