[Pymilter] milter multiprocess (or multithread)
Sami-Pekka Hallikas
semi at hallikas.com
Thu Dec 12 11:23:49 EST 2019
Years ago I did found out that almost all signals are ignored when
running threads.
I managed to build my program to use threads, and quit nicely, by
watching external files. So I send 'signals' to my program just using
files...
Like watching if config file is updated, reload it. If "pid file" is
missing, quit, etc.
I think my biggest issue was how to keep variables updated between
threads.
Biggest issue is that ^C is not working, but I just ignore it for now. I
don't think there is workaround how to get those missing signals passed
to parent and child programs.
---
Semi
Marco kirjoitti 12.12.2019 17:00:
> On 10/12/2019 20:00, Stuart D. Gathman wrote:
> [...]
>> You can also call Milter.stop()
>>
>> All the low level entry points are included in Milter.
>>
>> import Milter
>> ...
>> # in some thread, perhaps responding to a magic HELO or management
>> # socket
>> milter.stop()
>
> I tried this too. But it seems that all attempt to manage the signals
> fail when Milter.runmilter is present...
>
> Thank you
> Marco
> _______________________________________________
> Pymilter mailing list
> Pymilter at gathman.org
> https://gathman.org/mailman/listinfo/pymilter
More information about the Pymilter
mailing list