Bug 240767 - linprocfs(4) - /proc/fd is weird
Summary: linprocfs(4) - /proc/fd is weird
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-emulation mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-23 12:04 UTC by Edward Tomasz Napierala
Modified: 2020-01-13 12:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Tomasz Napierala freebsd_committer 2019-09-23 12:04:52 UTC
Linux apps, such as ps(1), expects stuff in /proc/fd/ to be symlinks.  I'm not sure how to fix it, because I'm not sure how that part of linprocfs actually works - it _somehow_ redirects /proc/fd to /dev/fd/.
Comment 1 Edward Tomasz Napierala freebsd_committer 2020-01-13 12:51:45 UTC
So, the way it works right now is that for current process - and that process only - linprocfs provides a symlink from /proc/self/fd to /dev/fd.

Making this work properly would require adding file descriptor knowledge to procfs itself; possibly to pseudofs.

The current behaviour breaks tty(1) and a recent screen(1).