Changeset View
Changeset View
Standalone View
Standalone View
src/lib/util/kprocesslist_unix_procstat_p.h
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 99 | { | |||
---|---|---|---|---|---|
111 | args = procstat_getargv(processes.parent.pstat, proc, 0); | 111 | args = procstat_getargv(processes.parent.pstat, proc, 0); | ||
112 | if (args) { | 112 | if (args) { | ||
113 | for (int i = 0; args[i] != nullptr; i++) { | 113 | for (int i = 0; args[i] != nullptr; i++) { | ||
114 | command_line << QString::fromLocal8Bit(args[i]); | 114 | command_line << QString::fromLocal8Bit(args[i]); | ||
115 | } | 115 | } | ||
116 | } | 116 | } | ||
117 | 117 | | |||
118 | pid_t pid = proc->ki_pid; | 118 | pid_t pid = proc->ki_pid; | ||
119 | pid_t ppid = proc->ki_ppid; | ||||
119 | QString user = QString::fromLocal8Bit(proc->ki_login); | 120 | QString user = QString::fromLocal8Bit(proc->ki_login); | ||
120 | return KProcessInfo(pid, command_line.join(QString::fromLocal8Bit(" ")), command, user); | 121 | return KProcessInfo(pid, command_line.join(QString::fromLocal8Bit(" ")), command, user); | ||
121 | } | 122 | } | ||
122 | }; | 123 | }; | ||
123 | 124 | | |||
124 | ProcessIterator begin() const { return ProcessIterator(*this, 0); } | 125 | ProcessIterator begin() const { return ProcessIterator(*this, 0); } | ||
125 | ProcessIterator end() const { return ProcessIterator(*this, this->count()); } | 126 | ProcessIterator end() const { return ProcessIterator(*this, this->count()); } | ||
126 | }; | 127 | }; | ||
127 | } | 128 | } |