Skip to content

proc: Add pos and mnt_id fields to /proc/[pid]/fdinfo/[fd]#12859

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test/cl893667695
Open

proc: Add pos and mnt_id fields to /proc/[pid]/fdinfo/[fd]#12859
copybara-service[bot] wants to merge 1 commit intomasterfrom
test/cl893667695

Conversation

@copybara-service
Copy link
Copy Markdown

proc: Add pos and mnt_id fields to /proc/[pid]/fdinfo/[fd]

Currently gVisor only outputs the flags field in fdinfo, which causes the Python library psutil to fail with IndexError when parsing fdinfo, as they expect pos to be the first line.

Add the typical base fields pos and mnt_id.

  • pos: via Seek(ctx, 0, SEEK_CUR), defaults to 0 for non-seekable fds
  • mnt_id: from file.Mount().ID

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12819 from tanyifeng:proc-fdinfo-pos-mntid d238786

Currently gVisor only outputs the flags field in fdinfo, which causes the Python library psutil to fail with IndexError when parsing fdinfo, as they expect pos to be the first line.

Add the typical base fields pos and mnt_id.
- pos: via Seek(ctx, 0, SEEK_CUR), defaults to 0 for non-seekable fds
- mnt_id: from file.Mount().ID

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12819 from tanyifeng:proc-fdinfo-pos-mntid d238786
PiperOrigin-RevId: 893667695
@copybara-service copybara-service bot added the exported Issue was exported automatically label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant