Summary: | /proc/curproc/file returns unknown | ||
---|---|---|---|
Product: | Base System | Reporter: | Slaven Rezic <eserte> |
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | ||
Priority: | Normal | ||
Version: | 4.3-STABLE | ||
Hardware: | Any | ||
OS: | Any |
Description
Slaven Rezic
2002-03-09 11:40:04 UTC
On Sat, Mar 09, 2002 at 12:28:07PM +0100, Slaven Rezic wrote:
> If run as ./a.out, it works OK.
> However, if a subdirectory in the same directory is deleted,
> then the program returns "unknown":
>
> mkdir foo ; rmdir foo ; ./a.out
>
> This works again:
>
> mkdir foo ; rmdir foo ; `pwd`/a.out
This is the same problem which sometimes caused the Linux emulators
getcwd to fail. The linux emulation code has since been fixed to
try harder, as Linux applications expect it to.
I'm not sure that people would be in favour of making procfs try
harder, as procfs doesn't even have to be mounted for most things
in FreeBSD now. If you did want to try and fix it, then the place
to start looking would be at the Linux emulation getcwd code in
/usr/src/sys/compat/linux/linux_getcwd.c.
David.
State Changed From-To: open->closed A bug in a subsystem that is deprecated. |