Commit ee42dcb6 authored by Tobias Hunger's avatar Tobias Hunger Committed by Alexander Görtz

Journald: Do not emit signals for kernel messages

Those have no _PID set, which we treated as 0. This is also
the PID we set when an application is finished. This leads to
journald messages showing up in the application output *after*
the application was finished.

Change-Id: I980199740a85c4e68221399eceb543affa12387f
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: default avatarAlexander Görtz <alexander.goertz@tu-dortmund.de>
parent 335f6e43
......@@ -227,7 +227,10 @@ void JournaldWatcher::handleEntry()
continue;
const QByteArray pid = logEntry.value(QByteArrayLiteral("_PID"));
quint64 pidNum = pid.isEmpty() ? 0 : QString::fromLatin1(pid).toInt();
if (pid.isEmpty())
continue;
quint64 pidNum = QString::fromLatin1(pid).toInt();
QString message = QString::fromUtf8(logEntry.value(QByteArrayLiteral("MESSAGE")));
message.append(QLatin1Char('\n')); // Add newline.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment