[New-bugs-announce] [issue39792] Two Ctrl+C is required to terminate when a pipe is blocking

Masahiro Sakai report at bugs.python.org
Sat Feb 29 01:04:20 EST 2020


New submission from Masahiro Sakai <masahiro.sakai at gmail.com>:

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, "w")
    f_w.buffer.write(b"a" * 65536)
    f_w.buffer.write(b"b")

main()
----

----------
components: IO
messages: 362964
nosy: msakai
priority: normal
severity: normal
status: open
title: Two Ctrl+C is required to terminate when a pipe is blocking
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39792>
_______________________________________


More information about the New-bugs-announce mailing list