Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 1998 12:22:58 +0300 (EEST)
From:      Andrew Stesin <stesin@gu.net>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        The Hermit Hacker <scrappy@hub.org>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: filename from open file descriptor...
Message-ID:  <Pine.BSF.3.96.980413122102.12267v-100000@beast.gu.net>
In-Reply-To: <199804102218.PAA01789@usr07.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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?)

Best regards,
Andrew Stesin

nic-hdl: ST73-RIPE



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?Pine.BSF.3.96.980413122102.12267v-100000>