Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2007 10:58:03 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Yuri <yuri@rawbw.com>
Cc:        freebsd-hackers@FreeBSD.org, Robert Watson <rwatson@FreeBSD.org>
Subject:   Re: How to get filename of an open file descriptor
Message-ID:  <86wssl2lp0.fsf@ds4.des.no>
In-Reply-To: <1194980181.4739f355a32bc@webmail.rawbw.com> (yuri@rawbw.com's message of "Tue\, 13 Nov 2007 10\:56\:21 -0800")
References:  <1194896018.4738aa922f776@webmail.rawbw.com> <20071112214243.Y81124@fledge.watson.org> <1194905125.4738ce25a968c@webmail.rawbw.com> <20071112222557.N81124@fledge.watson.org> <1194980181.4739f355a32bc@webmail.rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Yuri <yuri@rawbw.com> writes:
> But is there any workaround in 6.3? I need to port one package that
> needs to lookup file names by FDs to the current FreeBSD and need some
> solution now.

You can not reliably obtain a file name from a file descriptor.  The
best you can hope for is to find a file name that resolves to the vnode
that the file descriptor is associated with.  The file name you find (if
you do - there is no guarantee) may or may not be the name by which the
file was opened.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wssl2lp0.fsf>