Hello, I use a nullfs mount /journal/usrlocal in /usr/local : mount: /dev/ada0s2e.journal on /journal (ufs, asynchronous, local, gjournal) procfs on /proc (procfs, local) /journal/usrlocal on /usr/local (nullfs, local) /proc/curproc/file returns "unknown" with a binary called via a nullfs mountpoint, but not if called directly. test program (test.c) #include <stdio.h> #include <unistd.h> #include <errno.h> main() { ssize_t n = 0; char link[1024]; n = readlink("/proc/curproc/file", link, 1024); if (n == -1) { printf("error : %d\n", errno); } else { printf("file = %s\n", link); } } build and copy "test" binary into /usr/local/bin $ /journal/usrlocal/bin/test file = /journal/usrlocal/bin/test $ /usr/local/bin/test file = unknown This prevents me to run java (it uses curproc file to find where are its libraries) Thanks, regards. How-To-Repeat: See above
Le Sat, 21 May 2011 11:18:00 GMT, Patrick Lamaiziere <patfbsd@davenulle.org> a écrit : > /proc/curproc/file returns "unknown" with a binary called via a > nullfs mountpoint, but not if called directly. Well, i've looked a bit the procfs code and this behavior seems more or less intented by the function vn_fullpath(9). procstat(1) is affected too : procstat: sysctl: kern.proc.pathname: 2265: No such file or directory So it looks to be a limitation instead of a bug. I would like to suggest to reclassify this PR into the doc section and the attached patch to document the nulls manual page (as usual feel free to change the text as english is not my natural language). Thanks, regards
Responsible Changed From-To: freebsd-bugs->freebsd-doc Reclassify at submitter request.
Responsible Changed From-To: freebsd-doc->eadler I'll take it.
Responsible Changed From-To: eadler->freebsd-bugs I won't be looking at this PR for a while and I need to clear some out of my queue
^Triage: reset inaccurate In Progress state.