FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-90092: Fix test_curses when stdin is write-only (e.g. under nohup) by serhiy-storchaka · Pull Request #153420 · python/cpython · GitHub

Repository navigation

gh-90092: Fix test_curses when stdin is write-only (e.g. under nohup) - #153420

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-test-newterm-stdin
Jul 9, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-test-newterm-stdin

Conversation

serhiy-storchaka commented Jul 9, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

test_curses fails in setUp() when the suite is run backgrounded under nohup:

OSError: [Errno 22] Invalid argument

setUp() derives the newterm() input fd from stdin, but nohup leaves stdin write-only when it backgrounds a run started from a terminal, and newterm() rejects a write-only input fd. Fall back to the output fd in that case, as is already done when stdin has no fileno().

This only affects builds using the newterm() path (ncurses 6.5+); the previous initscr() path tolerated a write-only stdin.

Reported by @weixlu.

…nohup)

newterm() needs a readable input fd, but nohup can leave stdin write-only.
Fall back to the output fd, as already done when stdin has no fileno.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bedevere-app Bot added the tests Tests in the Lib/test dir label Jul 9, 2026
serhiy-storchaka enabled auto-merge (squash) July 9, 2026 15:23
serhiy-storchaka merged commit eacb85a into python:main Jul 9, 2026
93 of 95 checks passed
serhiy-storchaka deleted the curses-test-newterm-stdin branch July 15, 2026 11:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL