Skip to content

fcntl: make mutate_flag optional for ioctl w/ read-only buffer - #3882

Merged
srittau merged 1 commit into
python:masterfrom
julian-klode:fix-3881
Mar 24, 2020
Merged

srittau merged 1 commit into
python:masterfrom
julian-klode:fix-3881

Conversation

@julian-klode

Copy link
Copy Markdown
Contributor

Having the flag mandatory broke code like

buf = fcntl.ioctl(fileno, termios.TIOCGWINSZ, 8 * b' ')

which had to be rewritten as

buf = fcntl.ioctl(fileno, termios.TIOCGWINSZ, 8 * b' ', False)

which happens to be incompatible with Python 2, and extra noise.

Fixes #3881

Having the flag mandatory broke code like

	buf = fcntl.ioctl(fileno, termios.TIOCGWINSZ, 8 * b' ')

which had to be rewritten as

	buf = fcntl.ioctl(fileno, termios.TIOCGWINSZ, 8 * b' ', False)

which happens to be incompatible with Python 2, and extra noise.

Fixes python#3881

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau
srittau merged commit 009b269 into python:master Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fcntl.ioctl() regression: mutate_flag now mandatory for read-only buffer

2 participants