D20007: Add GetProcessList for retrieving the list of currently active processes

Adriaan de Groot noreply at phabricator.kde.org
Tue Mar 26 12:52:28 GMT 2019


adridg added a comment.


  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;

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/20190326/44fd3eb7/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list