This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Two Ctrl+C is required to terminate when a pipe is blocking
Type: behavior Stage:
Components: IO Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: msakai
Priority: normal Keywords:

Created on 2020-02-29 06:04 by msakai, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg362964 - (view) Author: Masahiro Sakai (msakai) Date: 2020-02-29 06:04
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()
----
History
Date User Action Args
2022-04-11 14:59:27adminsetgithub: 83973
2020-03-07 09:42:03terry.reedysetversions: - Python 3.6
2020-02-29 06:04:20msakaicreate