nowsecure / fsmon

monitor filesystem on iOS / OS X / Android / FirefoxOS / Linux

Home Page:https://www.nowsecure.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getProcName chop processname in Linux

trufae opened this issue · comments

this is a kernel setting

http://lxr.free-electrons.com/source/include/linux/sched.h#L315

TASK_COMM_LEN is set to 16, this requires a kernel recompilation to change.

you can use /proc/$PID/cmdline, but then you have to do all sorts of funky stuff to parse out the program name (which also isn't guaranteed to be the same as the TASK_COMM