Skip to content

kernel: file_wrapper: copy mode of original inode#2937

Merged
aviraxp merged 1 commit into
mainfrom
mode
Nov 15, 2025
Merged

kernel: file_wrapper: copy mode of original inode#2937
aviraxp merged 1 commit into
mainfrom
mode

Conversation

@5ec1cff

@5ec1cff 5ec1cff commented Nov 15, 2025

Copy link
Copy Markdown
Collaborator

Bionic uses fstat to determine whether an fd is a tty and set proper buffering flags, so we also need to set the wrapper file's inode mode to the original inode mode.

see: https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/upstream-openbsd/lib/libc/stdio/makebuf.c;l=61-95;drc=9a4b68e20d617b2cb3355071521f16e8c3d538df

@aviraxp aviraxp merged commit 463afa7 into main Nov 15, 2025
15 checks passed
@aviraxp aviraxp deleted the mode branch November 15, 2025 11:52
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.

2 participants