Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return sorted pids() #1437

Closed
giampaolo opened this issue Feb 26, 2019 · 0 comments
Closed

Return sorted pids() #1437

giampaolo opened this issue Feb 26, 2019 · 0 comments

Comments

@giampaolo
Copy link
Owner

giampaolo commented Feb 26, 2019

...for consistency across different platforms. E.g., on OSX, pids are reverse sorted:

>>> import psutil
>>> psutil.pids()
[5944, 4135, 4134, 4029, 3004, 2890, 2889, 2887, 2875, 785, 593, 585, 
584, 576, 574, 573, 572, 533, 531, 530, 517, 509, 489, 488, 487, 486, 316, 
315, 271, 266, 263, 260, 259, 257, 255, 254, 249, 247, 244, 243,  235, 
233, 217, 191, 187, 186, 185, 183, 181, 180, 179, 177, 174, 173, 172, 169, 
167, 165, 164, 157, 151,  150, 149, 148, 139, 132, 129, 116, 115,  113, 112, 
108, 98, 97, 96, 94, 93, 92, 91, 89, 85, 84, 81, 79, 78,  77, 76, 74, 73, 71, 
70, 68,  67, 66, 62, 61, 59, 53, 52, 51, 47, 46, 44, 43, 1, 0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant