From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 14 09:58:14 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12F7E16A468; Wed, 14 Nov 2007 09:58:14 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id C458013C469; Wed, 14 Nov 2007 09:58:13 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 3EB1C2092; Wed, 14 Nov 2007 10:58:04 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.1/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id B26D7208F; Wed, 14 Nov 2007 10:58:03 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 8A42A84488; Wed, 14 Nov 2007 10:58:03 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Yuri 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> Date: Wed, 14 Nov 2007 10:58:03 +0100 In-Reply-To: <1194980181.4739f355a32bc@webmail.rawbw.com> (yuri@rawbw.com's message of "Tue\, 13 Nov 2007 10\:56\:21 -0800") Message-ID: <86wssl2lp0.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, Robert Watson Subject: Re: How to get filename of an open file descriptor X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2007 09:58:14 -0000 Yuri 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