Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Sep 2012 07:10:42 -0400
From:      Sam Varshavchik <mrsam@courier-mta.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: What happened to my /proc/curproc/file?
Message-ID:  <cone.1346757042.638408.23058.1000@monster.email-scan.com>
References:  <cone.1346723177.448775.23058.1000@monster.email-scan.com> <20120904101429.GV33100@deviant.kiev.zoral.com.ua>

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



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