From owner-freebsd-questions@FreeBSD.ORG Tue Jan 24 07:48:02 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A09D1106566C for ; Tue, 24 Jan 2012 07:48:02 +0000 (UTC) (envelope-from info@o-notation.org) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mx1.freebsd.org (Postfix) with ESMTP id 2C5618FC15 for ; Tue, 24 Jan 2012 07:48:01 +0000 (UTC) Received: from kant.vitec-loesung.de (p5DC93D95.dip.t-dialin.net [93.201.61.149]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MReYO-1SDhYv099M-00SjIc; Tue, 24 Jan 2012 08:48:01 +0100 Received: from [10.0.0.46] (neuromancer.vitec-loesung.de [10.0.0.46]) by kant.vitec-loesung.de (Postfix) with ESMTP id 25C7B2A23E for ; Tue, 24 Jan 2012 08:45:30 +0100 (CET) Message-ID: <4F1E6198.5000304@o-notation.org> Date: Tue, 24 Jan 2012 08:45:28 +0100 From: Info User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4F1D3BE5.9030607@o-notation.org> <4F1DB120.3030103@degoeje.nl> In-Reply-To: <4F1DB120.3030103@degoeje.nl> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:iSEkFCBRd0WOhO8Qo/kSyDNJsFArli59aO1f50UWRrg +NYHSc/NiY0Qdv4b0km8ZRHv691v/tI8AQvNkLwS8+VF5ss1mX tZfrBUXxLlIPBLiVNfejDkYMISVn+XHqt4L5HE26FXSrSIcPt6 2wKnY6qDV659d4jmdksbYy5T1ZrELB6KwByPf4weiqe7ilnshw kxn13n/gRk+ZhbTlSLkfKy9QEMvBve0CJTLBcd0jBZM6sMASnh ATEqmlBOsrcGFy2SUdXD0CyaVCMtOYlugfGqGtL5SUwXdC37Ht 8jR8lQCYSEXllaWgR0QhrjNTM0CIfGnlPe95X3xJFHFP+0sOMK vU5OnNLVckJEVv9MoiYA= Subject: Re: kqueue and filenames X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2012 07:48:02 -0000 Thanks for your reply! Am 23.01.2012 20:12, schrieb Pieter de Goeje: >> kevent is triggered when a file is renamed. How do I get the new name? >> Is there an extra function? In the moment, I see only the possibility >> by searching the filesystem(folder) for a new name. > A good question to which I unfortunately do not have the answer to. I > think in principle it is impossible to get the file name by file > descriptor alone (it could have multiple names). In practice I would > just treat NOTE_RENAME as a sequence of unlink/link. I believe tools > like lsof use the system name cache to map fds to names, but that is not > very reliable. > Ok, then it's a new challenge! I was hoping, that there's a more comfortable way to obtain the new filename. Matthias