Aqcuiring full path to running process from outside the kernel

Lutz Boehne lboehne at damogran.de
Tue Aug 22 14:28:14 UTC 2006


> but argv[0] is either an absolute path or a path relative to pwd,
> unless your shell is broken.

One should also consider users breaking argv[0] intentionally, e.g. 
pointing it to other files which could lead to undesired/unpredictable 
behaviour. Even as a fallback it's probably not wise to trust it.

Lutz


More information about the freebsd-hackers mailing list