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

Method LinuxProcessInfo

src/ProcessInfo.cpp:409–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407{
408public:
409 explicit LinuxProcessInfo(int pid, int sessionPid)
410 : UnixProcessInfo(pid)
411 {
412 if (pid == 0 || _cGroupCreationFailed) {
413 return;
414 }
415
416 if (_createdAppCGroupPath.isEmpty() && !_cGroupCreationFailed) {
417 _cGroupCreationFailed = !initCGroupHierachy(pid);
418 if (KonsoleSettings::enableMemoryMonitoring() && !_cGroupCreationFailed) {
419 setUnitMemLimit(KonsoleSettings::memoryLimitValue());
420 }
421 return;
422 }
423
424 const bool isForegroundProcess = sessionPid != -1;
425
426 if (!isForegroundProcess) {
427 _cGroupCreationFailed = !createCGroup(QStringLiteral("tab(%1).scope").arg(pid), pid);
428 } else {
429 _cGroupCreationFailed = !moveToCGroup(getProcCGroup(sessionPid), pid);
430 }
431 }
432
433 static bool setUnitMemLimit(const int newMemHigh)
434 {

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected