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
This commit is contained in:
parent
004a9aa6ea
commit
00281711d9
1 changed files with 1 additions and 1 deletions
|
@ -1477,7 +1477,7 @@ void ShellClient::killWindow()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto c = surface()->client();
|
auto c = surface()->client();
|
||||||
if (c->processId() == getpid()) {
|
if (c->processId() == getpid() || c->processId() == 0) {
|
||||||
c->destroy();
|
c->destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue