D20007: Add GetProcessList for retrieving the list of currently active processes
David Hallas
noreply at phabricator.kde.org
Wed Mar 27 18:48:20 GMT 2019
hallas added a comment.
In D20007#438640 <https://phabricator.kde.org/D20007#438640>, @adridg wrote:
> On FreeBSD, `/proc` is not necessarily mounted (it might be a Linuxism). So while I do **have** `/proc`, it's empty because procfs isn't mounted there. If I **do** mount it, then there's the expected list of processes and a curproc symlink. But `/proc/<pid>` doesn't contain a `stat` file .. there's a `status`, though. Let me mess around a bit with that... yes, changing to `status` makes all 6 tests pass. So I'd suggest something like
>
> #ifdef Q_OS_FREEBSD
> QString statusFileName(QStringLiteral("/status"));
> #else
> QString statusFileName(QStringLiteral("/stat"));
> #endif
>
>
> and then later on
>
> filename += statusFileName;
>
@adridg - thanks a lot for testing the patch on FreeBSD! I have incorporated the changes you suggested, it would be nice if you could give it a test again :D
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D20007
To: hallas, davidedmundson, broulik
Cc: vonreth, adridg, elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190327/af5dab9a/attachment.html>
More information about the Kde-frameworks-devel
mailing list