Cameron Simpson <c...@cskk.id.au> writes:

[...]
>  What if you did this:
>
>  os.signal(SIGINT, SIG_IGN)
>  ... code code code, including the Popen/wait ...
>  old_handler = os.signal(SIGINT, do_nothing_handler)
>  sleep(...)
>  os.signal(SIGINT, old_handler)
>
> SIG_IGN is different from a do-nothing handler; it prevents the process
> seeing the signal at all, and therefore prevents the signal interrupting
> system calls.
>
> So you activate your dummy-quit-sleeping function only around the sleep 
> itself.

Thanks. That is a good idea. I'll try that out.
Or I could first try to switch to Python 3, as Chris suggested, to see if that 
makes the problem disappear.
-- 
Piet van Oostrum <pie...@vanoostrum.org>
WWW: http://piet.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to