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 pro

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

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

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

2014-05-07 Thread Grant Edwards
On 2014-05-07, Ben Finney wrote: > Grant Edwards writes: > >> On 2014-05-07, Grant Edwards 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’ modu

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

2014-05-07 Thread Ben Finney
Grant Edwards writes: > On 2014-05-07, Grant Edwards 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 https://docs.python.org/3/library/multipr

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

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

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