Re: Random signal capture when using multiprocessing

2019-07-06 Thread José María Mateos
On Sat, Jul 06, 2019 at 04:54:42PM +1000, Chris Angelico wrote: > But if I comment out the signal.signal line, there seem to be no ill > effects. I suspect that what you're seeing here is the multiprocessing > module managing its own subprocesses, telling some of them to shut > down. I added a pri

Re: Random signal capture when using multiprocessing

2019-07-05 Thread Chris Angelico
On Sat, Jul 6, 2019 at 12:13 AM José María Mateos wrote: > > Hi, > > This is a minimal proof of concept for something that has been bugging me for > a few days: > > ``` > $ cat signal_multiprocessing_poc.py > > import random > import multiprocessing > import signal > import time > > def signal_ha

Re: Random signal capture when using multiprocessing

2019-07-05 Thread dieter
José María Mateos writes: > This is a minimal proof of concept for something that has been bugging me for > a few days: > > So basically I have some subprocesses that don't do anything, just sleep for > a few milliseconds, and I capture SIGTERM signals. I don't expect > ... > Running round

Random signal capture when using multiprocessing

2019-07-05 Thread José María Mateos
Hi, This is a minimal proof of concept for something that has been bugging me for a few days: ``` $ cat signal_multiprocessing_poc.py import random import multiprocessing import signal import time def signal_handler(signum, frame): raise Exception(f"Unexpected signal {signum}!") def proc