From 01d5d99e165919fda16261c6d2310257b0f580e3 Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Wed, 8 Mar 2017 05:44:59 +0300 Subject: [PATCH] forgotten fixes --- sources/queued/include/queued/QueuedConfiguration.h | 3 ++- sources/queued/include/queued/QueuedProcess.h | 6 +++++- sources/queued/src/QueuedProcess.cpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sources/queued/include/queued/QueuedConfiguration.h b/sources/queued/include/queued/QueuedConfiguration.h index 354361c..15cd354 100644 --- a/sources/queued/include/queued/QueuedConfiguration.h +++ b/sources/queued/include/queued/QueuedConfiguration.h @@ -147,7 +147,8 @@ const QueuedSettingsDefaultMap QueuedSettingsDefaults = { {"ProcessCommandLine", {QueuedSettings::ProcessCommandLine, "systemd-run\x01--scope\x01--unit={name}\x01--uid={uid}\x01--gid={gid}" - "\x01-p\x01CPUQuota={cpu}%\x01-p\x01MemoryHigh={memory}\x01{app}"}}}; + "\x01-p\x01CPUQuota={cpu}%\x01-p\x01MemoryHigh={memory}\x01{" + "application}"}}}; }; #endif /* QUEUEDCONFIGURATION_H */ diff --git a/sources/queued/include/queued/QueuedProcess.h b/sources/queued/include/queued/QueuedProcess.h index 38be799..b78f4b6 100644 --- a/sources/queued/include/queued/QueuedProcess.h +++ b/sources/queued/include/queued/QueuedProcess.h @@ -232,7 +232,11 @@ public: * @brief set process line * @param _processLine * original process line - * @remark the following values will be replaced + * @remark values in {} will be replaced + * 1. Property names, like {name}, {uid}, etc + * 2. {cpu} will be replaced to QueuedSystemInfo::cpuWeight(limit) in % + * 3. {memory} will be replaced to limit + * 4. {application} will be replaced to application line and arguments */ void setProcessLine(const QString &_processLine); /** diff --git a/sources/queued/src/QueuedProcess.cpp b/sources/queued/src/QueuedProcess.cpp index 3aac605..75d5095 100644 --- a/sources/queued/src/QueuedProcess.cpp +++ b/sources/queued/src/QueuedProcess.cpp @@ -92,7 +92,7 @@ void QueuedProcess::updateArguments() // command line QString commandLine = command() + "\x01" + commandArguments().join('\x01'); - application.replace("{app}", commandLine); + application.replace("{application}", commandLine); QStringList arguments = application.split('\x01');