[issue39792] Two Ctrl+C is required to terminate when a pipe is blocking

2020-02-28 Thread Masahiro Sakai
New submission from Masahiro Sakai : I noticed that two Ctrl+C instead of one are required to terminate following program on macOS and Linux. I guess that the first Ctrl+C is ignored inside one of the finalizers. import os def main(): r, w = os.pipe() f_w = os.fdopen(w, &q

[issue39745] BlockingIOError.characters_written represents number of bytes not characters

2020-02-24 Thread Masahiro Sakai
Change by Masahiro Sakai : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue39745> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39745] BlockingIOError.characters_written represents number of bytes not characters

2020-02-24 Thread Masahiro Sakai
New submission from Masahiro Sakai : According to https://docs.python.org/3/library/exceptions.html#BlockingIOError , 'characters_written' is "An integer containing the number of characters written to the stream before it blocked". But I observed that it represents number

[issue39735] Signal handler is invoked recursively

2020-02-23 Thread Masahiro Sakai
New submission from Masahiro Sakai : If I run following program, the parent process fails with "RecursionError: maximum recursion depth exceeded", because the signal handler is invoked during the execution of the same handler. import os import signal import time def f(sig