Date: Mon, 13 Apr 1998 19:32:44 +1000 (EST) From: Darren Reed <avalon@coombs.anu.edu.au> To: stesin@gu.net Cc: tlambert@primenet.com, scrappy@hub.org, freebsd-hackers@FreeBSD.ORG Subject: Re: filename from open file descriptor... Message-ID: <199804130932.CAA14597@hub.freebsd.org> In-Reply-To: <Pine.BSF.3.96.980413122102.12267v-100000@beast.gu.net> from "Andrew Stesin" at Apr 13, 98 12:22:58 pm
next in thread | previous in thread | raw e-mail | index | archive | help
In some mail from Andrew Stesin, sie said: > > On Fri, 10 Apr 1998, Terry Lambert wrote: > > > > I'm trying to debug some code, and have an open file descriptor > > > that I want to find the file name that its associated with... > > > > > > is this possible? my first thought was fstat(), but that appears > > > to return everything but the name :( > > > > You remember the name when you open the file. > > How about rename()-ing the already opened file "on the fly"? > (Want to note that correct discovery of filename from the filedescriptor > seems to be theoretically impossible?) How about just installing and using lsof ? Darren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804130932.CAA14597>