Add -l option to show full command line (fixes #23)

This commit is contained in:
anomen
2016-06-13 22:22:51 +02:00
parent 276d648c33
commit 5e2c35700b
8 changed files with 107 additions and 17 deletions

View File

@@ -225,7 +225,11 @@ Process *getProcess(unsigned long inode, const char *devicename) {
if (proc != NULL)
return proc;
Process *newproc = new Process(inode, devicename, node->name.c_str());
// extract program name and command line from data read from cmdline file
const char *prgname = node->cmdline.c_str();
const char *cmdline = prgname + strlen(prgname) + 1;
Process *newproc = new Process(inode, devicename, prgname, cmdline);
newproc->pid = node->pid;
char procdir[100];