Review Request 128909: initial, minimal support for OS X

René J.V. Bertin rjvbertin at gmail.com
Mon Sep 19 00:49:11 UTC 2016



> On Sept. 17, 2016, 9:52 p.m., René J.V. Bertin wrote:
> > processui/ReniceDlg.cpp, lines 78-87
> > <https://git.reviewboard.kde.org/r/128909/diff/5/?file=476988#file476988line78>
> >
> >     I've actually managed to get ksysguardprocesslist_helper to work with a patched libdbus and a hack to export the session bus socket name to the system dbus.
> 
> Aleix Pol Gonzalez wrote:
>     Is it really a good idea to rely on a patched libdbus?

I've been discussing this on the DBus ML, and am slowly getting my head about the hairy details and confusing terminology. I now know that the KAuth helper (DBus service executable, ksysguardprocesslist_helper in this case) has to connect on the system dbus. That removes the need for a hack, basically all I have to do is set `DBUS_LAUNCHD_SESSION_BUS_SOCKET` to the system dbus socket in the root user's environment.

It also means the libdbus patch can actually be discussed for upstreaming; the reason this particular feature doesn't work on OS X seems to be that helpers (services) like ksysguardprocesslist_helper don't even attempt to connect on the system bus on OS X. They just bail out when they fail to read the session bus socket name.

If we really wanted to tackle this problem correctly we'd write a specific (native) helper backend for KAuth, probably based on Apple's Service Management framework (which leverages launchd). I doubt that's worth the trouble at this point.


- René J.V.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128909/#review99243
-----------------------------------------------------------


On Sept. 17, 2016, 7:32 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128909/
> -----------------------------------------------------------
> 
> (Updated Sept. 17, 2016, 7:32 p.m.)
> 
> 
> Review request for KDE Base Apps and KDE Software on Mac OS X.
> 
> 
> Repository: libksysguard
> 
> 
> Description
> -------
> 
> This patch implements initial and rather minimal support for OS X, for now focussing purely on process information. That feature is justified as it is used by KDevelop in order to obtain the list of processes one can attach a debugger to.
> 
> Mac OS X is tricky because it requires special privileges in order to obtain certain types of information for any running process. For example, even obtaining the number of threads spawned by a foreign process requires privileges that aren't trivial to set up. I've prepared the terrain, but also implemented a fallback strategy that calls `ps` to be sure that crucial information like the command name is available for all processes.
> 
> 
> Diffs
> -----
> 
>   processcore/CMakeLists.txt e7c9263 
>   processcore/Info.plist PRE-CREATION 
>   processcore/helper.cpp d54c8e1 
>   processcore/processes_darwin_p.cpp PRE-CREATION 
>   processcore/processes_local_p.cpp 2bc123f 
>   processui/ReniceDlg.cpp a97563f 
>   processui/ksysguardprocesslist.cpp 44603de 
> 
> Diff: https://git.reviewboard.kde.org/r/128909/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.9.5 with Frameworks 5.24.0 and Qt 5.6.1
> 
> 
> File Attachments
> ----------------
> 
> Attach to Process widget in KDevelop
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/09/14/47468811-58cb-40b8-a735-4dd86dce98e1__Screen_Shot_2016-09-14_at_17.38.22.png
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20160919/a5c95d0e/attachment-0001.html>


More information about the kde-mac mailing list