Hangup when printing empty string to unbuffered stdout
オープン
まだ誰も着手していません。
interpreter-core
OS-unsupported
topic-IO
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Crash report
What happened?
$ sudo python3 -u -c 'print(""); print("foo")'
Hangup
When printing an empty string to unbuffered stdout, under certain circumstances (e.g. when running on AIX under sudo, screen, tmux), the user session including the Python interpreter will terminate.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Output from running 'python -VV' on the command line:
Python 3.12.13 (main, Mar 6 2026, 03:56:12) [GCC 10.3.0]
Linked PRs
- gh-148774
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、バッファリングされていない stdout を使って報告されたコマンドを再現し、issue に記載されている AIX、sudo、screen、tmux の状況に焦点を当てます。リンクされている PR gh-148774 と、それが示している CPython の関連する stdout/write パスを確認します。コマンドによってユーザーセッションが終了しなくなり、その動作が適切な回帰テストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100