Handle processId being 0 in ShellClient::killWindow
ClosedPublic

Authored by graesslin on Aug 6 2017, 6:58 PM.

Details

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

Diff Detail

Repository
R108 KWin
Branch
kill-window-process-0
Lint
No Linters Available
Unit
No Unit Test Coverage
graesslin created this revision.Aug 6 2017, 6:58 PM
Restricted Application added a project: KWin. · View Herald TranscriptAug 6 2017, 6:58 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
bshah accepted this revision as: bshah.Aug 7 2017, 5:09 AM
bshah added a subscriber: bshah.

Looks good to me, probably though it's good idea to figure out why it returns 0 as processId?

This revision is now accepted and ready to land.Aug 7 2017, 5:09 AM
This revision was automatically updated to reflect the committed changes.
In D7168#133094, @bshah wrote:

Looks good to me, probably though it's good idea to figure out why it returns 0 as processId?

We have a failing auto test for it in KWayland. It looks like libwayland-server is using a linuxism there.