From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 4 11:10:46 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90556106566B for ; Tue, 4 Sep 2012 11:10:46 +0000 (UTC) (envelope-from mrsam@courier-mta.com) Received: from www.courier-mta.com (www.courier-mta.com [216.254.115.190]) by mx1.freebsd.org (Postfix) with ESMTP id 5391C8FC14 for ; Tue, 4 Sep 2012 11:10:44 +0000 (UTC) Received: from monster.email-scan.com (monster.email-scan.com [::ffff:192.168.0.2]) (TLS: TLS1.0,256bits,RSA_AES_256_CBC_SHA1) by www.courier-mta.com with ESMTPS; Tue, 04 Sep 2012 07:10:43 -0400 id 000000000006086D.000000005045E1B3.00000370 Received: from monster.email-scan.com (localhost [127.0.0.1]) (IDENT: uid 1000) by monster.email-scan.com with ESMTP; Tue, 04 Sep 2012 07:10:42 -0400 id 000000000003E1F2.000000005045E1B2.00000CF1 References: <20120904101429.GV33100@deviant.kiev.zoral.com.ua> Message-ID: X-Mailer: http://www.courier-mta.org/cone/ From: Sam Varshavchik To: freebsd-hackers@freebsd.org Date: Tue, 04 Sep 2012 07:10:42 -0400 Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=_monster.email-scan.com-23058-1346757042-0005"; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: What happened to my /proc/curproc/file? 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: Tue, 04 Sep 2012 11:10:46 -0000 This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. The Internet standard for MIME PGP messages, RFC 2015, was published in 1996. To open this message correctly you will need to install E-mail or Usenet software that supports modern Internet standards. --=_monster.email-scan.com-23058-1346757042-0005 Content-Type: text/plain; format=flowed; delsp=yes; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 7bit Konstantin Belousov writes: > The procfs links, as well as any other user of vn_fullpath(9) function, > can only translate a vnode to path if namecache contains useful data. > As such, the facilities are not guaranteed to success all the time. > > In case of rmdir(2), UFS explicitely purges the cache for directory which > contained direntry of the removed directory. I suspect that you have > your test program binary located in the same directory which was the parent > of the removed one. Correct. Looks like the same thing applies if I try to use sysctl to get KERN_PROC_PATHNAME. I need some reliable way to get a process's executable file's name, as long as it's meaningful (the executable file hasn't been removed). --=_monster.email-scan.com-23058-1346757042-0005 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAlBF4bIACgkQx9p3GYHlUOJ5UACeJWUeJQRvA5qTRM8zSGzzZrHh nHoAnRaAk728nb1/sO3cti+fjivLKkHo =bLXf -----END PGP SIGNATURE----- --=_monster.email-scan.com-23058-1346757042-0005--