python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
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

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Grant Edwards invalid@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:

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Ben Finney
Grant Edwards invalid@invalid.invalid writes: On 2014-05-07, Grant Edwards invalid@invalid.invalid wrote: How do you terminate a Python program that's using multiprocessing? It looks like you have to kill all the threads individually. :/ As I understand it, the ‘multiprocessing’ module

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Ben Finney b...@benfinney.id.au wrote: Grant Edwards invalid@invalid.invalid writes: On 2014-05-07, Grant Edwards invalid@invalid.invalid wrote: How do you terminate a Python program that's using multiprocessing? It looks like you have to kill all the threads

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Grant Edwards
On 2014-05-07, Grant Edwards invalid@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:

Re: python-daemon interaction with multiprocessing (secure-smtpd)

2014-05-07 Thread Antoon Pardon
op 07-05-14 21:11, Grant Edwards schreef: Mainly, I'm just trying to figure out the right way to terminate the server from an /etc/init script. As far as I understand you have to make sure that your daemon is a proces group leader. All the children it will fork will then belong to its proces