Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71039

python-daemon interaction with multiprocessing (secure-smtpd)

From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject python-daemon interaction with multiprocessing (secure-smtpd)
Date 2014-05-07 17:04 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <lkdp2i$s9c$1@reader1.panix.com> (permalink)

Show all headers | View raw


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!

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

python-daemon interaction with multiprocessing (secure-smtpd) Grant Edwards <invalid@invalid.invalid> - 2014-05-07 17:04 +0000
  Re: python-daemon interaction with multiprocessing (secure-smtpd) Grant Edwards <invalid@invalid.invalid> - 2014-05-07 17:55 +0000
    Re: python-daemon interaction with multiprocessing (secure-smtpd) Ben Finney <ben@benfinney.id.au> - 2014-05-08 05:01 +1000
      Re: python-daemon interaction with multiprocessing (secure-smtpd) Grant Edwards <invalid@invalid.invalid> - 2014-05-07 19:11 +0000
        Re: python-daemon interaction with multiprocessing (secure-smtpd) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-05-07 21:45 +0200
  Re: python-daemon interaction with multiprocessing (secure-smtpd) Grant Edwards <invalid@invalid.invalid> - 2014-05-07 21:07 +0000

csiph-web