George Slavin added the comment:
I've attached the test for this patch (I couldn't figure out how to upload two
files with one comment).
--
Added file: http://bugs.python.org/file44747/test_sig_int_builtins.py
___
Python trac
George Slavin added the comment:
I have a patch that checks for KeyboardInterrupt during builtin operations.
This allows sum, max, min, list, dict, set, and tuple calls to be interrupted
when they are working on infinite iterators.
I've attached the patch, and a test I wrote to show tha
George Slavin added the comment:
The docs say the sleep call will end if a signal is caught, so once the
main thread wakes, it won't go back to sleep.
On Sep 6, 2016 12:35 AM, "Andre Merzky" wrote:
>
> Andre Merzky added the comment:
>
> Hi George,
>
> >
George Slavin added the comment:
In case anyone else sees this thread, here's my trimmed down script to repro
the issue:
#!/usr/bin/env python2
import threading as mt
import signal
import time
import os
def sigusr2_handler(signum, frame):
raise RuntimeError('caug
George Slavin added the comment:
Thanks for the reply! I've managed to reproduce the issue without using
ctypes, so we can exclude ctypes as the cause of the problem :)
The bug only occurs for me after hundreds of iterations of the script, so it is
very intermittent.
>From my res
George Slavin added the comment:
I can reproduce this issue with Python 2.7.12 and Python 3.5.2 on a Arch linux
VM using the python script provided, but I think this is an error in the code.
The repro is tied to the time.sleep call in the try block. If I do
time.sleep(1), I can reproduce