Commit 00281711 authored by Martin Flöser's avatar Martin Flöser

Handle processId being 0 in ShellClient::killWindow

Summary:
If ClientConnection fails to get the process id (which happens at least
on FreeBSD) the process id is 0. We should not try to terminate this pid
as it terminates all processes is KWin's process group which is the whole
session.

Test Plan: Only compile test

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7168
parent 004a9aa6
......@@ -1477,7 +1477,7 @@ void ShellClient::killWindow()
return;
}
auto c = surface()->client();
if (c->processId() == getpid()) {
if (c->processId() == getpid() || c->processId() == 0) {
c->destroy();
return;
}
......
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