D22471: [KProcessList] Split command line and process name
David Edmundson
noreply at phabricator.kde.org
Mon Jul 15 14:42:39 BST 2019
davidedmundson added a comment.
> So now name() will often return an empty string?
That's certainly not the intention.
The system is:
Firstly we do the fallback. Reading from /proc/N/state . Though this is rubbish and truncates things.
Both name and command are set to this.
Then we read /proc/N/cmdline
Then we extract the command.
We set the name to the first segment of the command (between the final / and the first null byte
We set the command to the full thing, but with all null bytes becoming spaces
On windows, name and command will return the same thing.
INLINE COMMENTS
> apol wrote in kprocesslist_unix.cpp:142
> if it's -1, when you do ++ it will become 0 anyway.
It would, but it would then requires a huge comment explaining it.
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D22471
To: davidedmundson
Cc: apol, broulik, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190715/dc8bcc6e/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list