From owner-freebsd-bugs Sat Mar 9 5:40:10 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 228D437B405 for ; Sat, 9 Mar 2002 05:40:07 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g29De6w25295; Sat, 9 Mar 2002 05:40:06 -0800 (PST) (envelope-from gnats) Date: Sat, 9 Mar 2002 05:40:06 -0800 (PST) Message-Id: <200203091340.g29De6w25295@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: David Malone Subject: Re: kern/35703: /proc/curproc/file returns unknown Reply-To: David Malone Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/35703; it has been noted by GNATS. From: David Malone To: Slaven Rezic Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/35703: /proc/curproc/file returns unknown Date: Sat, 9 Mar 2002 13:36:00 +0000 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message