Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Aug 2006 21:28:10 +0300
From:      "Reko Turja" <reko.turja@liukuma.net>
To:        <freebsd-hackers@freebsd.org>
Subject:   Aqcuiring full path to running process from outside the kernel
Message-ID:  <017601c6c486$6477c370$0a0aa8c0@rivendell>

next in thread | raw e-mail | index | archive | help
I've been playing with Open Watcom for a bit in FreeBSD and for a 
while there's been one stumblim block for further advancement. Watcom 
uses a method for storing program messages etc. where these messages 
are stored as a "resource file" inside the executable itself. As the 
commands are usually invoked without the canonical path, the tools 
cannot find the resource portion stored inside.

This far I've been looking for some solutions from which none seem to 
work too well. vn_fullpath (9) is running only inside kernel I think, 
and with the approach using kvm_openfiles and kvm_getprocs I can only 
get the command without the path (there are vnode etc. structures 
inside the kinfo_proc structure, but those seem to be unavailable from 
user space). Of course /proc might help in here, but I rather kept the 
code compilable on very vanilla system.

Any pointers on how to proceed would be welcome.

-Reko 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?017601c6c486$6477c370$0a0aa8c0>