MCPcopy Create free account
hub / github.com/KDE/konsole / readProcessInfo

Method readProcessInfo

src/UnixProcessInfo.cpp:37–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void UnixProcessInfo::readProcessInfo(int pid)
38{
39 // prevent _arguments from growing longer and longer each time this
40 // method is called.
41 clearArguments();
42
43 if (readProcInfo(pid)) {
44 readArguments(pid);
45 readCurrentDir(pid);
46
47 bool ok = false;
48 const QString &processNameString = name(&ok);
49
50 if (ok && processNameString == QLatin1String("sudo")) {
51 // Append process name along with sudo
52 const QVector<QString> &args = arguments(&ok);
53
54 if (ok && args.size() > 1) {
55 setName(processNameString + QStringLiteral(" ") + args[1]);
56 }
57 }
58 }
59}
60
61void UnixProcessInfo::readUserName()
62{

Callers

nothing calls this directly

Calls 3

nameFunction · 0.85
argumentsFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected